-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update format response from listpay is the payment was did with keysend #3888
Update format response from listpay is the payment was did with keysend #3888
Conversation
Thanks @cdecker to review this PR and to discover my mistakes. I'm running the local test and after it I will push the new commit. Only one thing that I need to clarify, I should insert a different Changelog? for instance Changelog-listpays? Maybe is possible to add a couple of lines inside the Haking.md to explain these rules at the people that want to start and don't know it? |
Oh right, I meant to comment on that as well: since you add a new optional parameter to the RPC call I'd say it needs to be a |
For the moment all done @cdecker.
|
|
@ZmnSCPxj, this is a good point, yep I agree with this update! I will try to improve the format of this feature. |
This probably means we need to add yet another argument to |
@ZmnSCPxj I wrote (74d2eee) some code to implement your suggestion and return the destination when the bolt11 is null. At this point output is like the json below: {
"pays": [
{
"bolt11": "lntb10n1p0jga20pp53h7k2w8wkvuprjg3ff6l0y4pgdeg6lc9vsln3s74wnfsjl5fzrqqdqdw3jhxazldahx2xqyjw5qcqp2sp5wut5jnhr6n7jd5747ky2g5flmw7hgx9yjnqzu60ps2jf6f7tc0us9qy9qsqu2a0k37nckl62005p69xavlkydkvhnypk4dphffy4x09zltwh9437ad7xkl83tefdarzhu5t30ju5s56wlrg97qkx404pq3srfc425cq3ke9af",
"payment_hash": "8dfd6538eeb33811c9114a75f792a143728d7f05643f38c3d574d3097e8910c0",
"status": "complete",
"preimage": "35bd4e2b481a1a84a22215b5372672cf81460a671816960ddb206464359e1822",
"amount_msat": "1000msat",
"amount_sent_msat": "1000msat"
},
{
"destination": "0219f8900ee78a89f050c24d8b69492954f9fdbabed753710845eb75d3a75a5880",
"payment_hash": "9c87f80bacf06a9ca08a9dcef90cf7f8b68f7b920df6020f3a0a04f35ab6c204",
"status": "complete",
"preimage": "3078e0c8574f756a27e7998138fe624c8d806f7075df95caee7e97efb785d108",
"amount_msat": "1000msat",
"amount_sent_msat": "1000msat"
}
]
} Did I understand your suggestion? In addition, I passed a couple of hours to discover a timeout exception inside the test travis https://travis-ci.com/github/vincenzopalazzo/lightning/jobs/367116591 Any suggestion about how I can discover this bug inside the code that I wrote? P.S: When @cdecker and @ZmnSCPxj have time, I'm happy to receive a review on the new code 😄 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursory glance looks fine to me, output seems sane.
The timeout bug, no idea, it just sometimes fails that way, grumble grumble....
@ZmnSCPxj Yes is very strange, now all tests are ok, on my branch for 3 consecutive times they were red. any why, all good for the moment. |
e56cc36
to
c9396f0
Compare
Rebased on top of |
02722ef
to
e39739f
Compare
Fixed up and squashed. |
e39739f
to
751e66f
Compare
listpays: make doc-all missed Changelog-Added: JSON-RPC: `listpays` can be used to query payments using the `payment_hash` Changelog-Added: JSON-RPC: `listpays` now includes the `payment_hash`
Changelog-Added: JSON-RPC: `listpays` now lists the `destination` if it was provided (e.g., via the `pay` plugin or `keysend` plugin)
751e66f
to
8783ae4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 8783ae4
Hi all.
This PR proposes an update to the response of the
listpay
command, discussed inside this issue. In particular, thelistpays
could return abolt11: (null)
propriety if the payment was made withkeysend
or if the payment was didi during the rc3 bug.In addition, this PR proposes the change inside the parameters accepted by
listpay
. In fact, the command could lose the meaning if I want to uselistpay
to filter the payment that I made withkeysend
. In other words, I can not require withlistpays
a single payment if it is made withkeysend
.Examples
keysend payment
invoice payment
In addition, I see inside the format description of the documentation, that reported an old description for the old payment. I think that this description could be removed or
signed.P.S: Maybe, in this PR the signature
Changelog-None
is not correct?Update
After a first review, the response format is changed, now the
payment_hash
is printed every time and the bolt11 is printed only if the value is notnull