-
Notifications
You must be signed in to change notification settings - Fork 912
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
Fix sendpay
aggregation and ordering in listpays
#4567
Merged
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
db5181f
pytest: Reproduce #4482
cdecker 9dc4726
db: Add groupid to the payments table
cdecker af371b6
jsonrpc: Add groupid to `sendpay` and `sendonion`
cdecker 9f887f3
pyln: Add groupid to `sendpay` and `sendonion`
cdecker 8163ae3
pay: Add `groupid` to the payment struct
cdecker e73564d
wallet: Add function to retrieve the latest groupid for a payment
cdecker 779826a
db: Add `groupid` to HTLCs
cdecker 2529daa
jsonrpc: Add missing `partid` in `listsendpays` schema
cdecker b83fd20
pay: Call `listsendpays` to find prior attempts and abort if needed
cdecker fc62b7f
doc: Add missing `amount_sent_msat` to `listpays`
cdecker 38ec80d
jsonrpc: Add `groupid` to `waitsendpay`
cdecker 95641e3
pay: Make `pay` idempotent
cdecker dd78d61
pay: Do not delete old sendpay attempts if we retry
cdecker 6e1341e
paycore: Prevent multiple concurrent payment groups
cdecker 99d5808
paycore: Default `groupid` to increment from last one
cdecker d555a99
pytest: Fix up `test_partial_payment` to use a single `groupid`
cdecker 75a4f5b
pay: Fail a `sendpay` or `sendonion` that'd produce a DB collision
cdecker fc94852
pytest: Add `groupid` to `test_partial_payment_{timeout,restart}`
cdecker fea3d08
pytest: Fix `test_onchain_timeout` to use `groupid`
cdecker f726fc6
libplugin: Add callbacks for successful and failed payments
cdecker 11d18c1
pytest: Adjust `test_sendpay` to the new semantics
cdecker b8280be
pay: Mark completed payments as such by nullifying `cmd`
cdecker 0da9623
pay: Stash and forward results for duplicate `pay` calls
cdecker 03847bd
pay: listpays groups by payment_hash and groupid
cdecker 71752df
db: Fix a syntax error with the optional parameters
cdecker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This assumes that listsendpays is listed in increasing groupid order? That assumption does not seem documented?
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.
This is a
listsendpays
call limited to thepayment_hash
of the invoice. There cannot be multiple groups in flight concurrently. So ordering byid
which we do internally inlightningd/pay.c
will result in the desired ordering ofgroupid
. I'll add a comment to that effect 👍