Skip to content

Fix payment failinfo groupid - #9734

Open
daywalker90 wants to merge 2 commits into
ElementsProject:masterfrom
daywalker90:fix-payment-failinfo-groupid
Open

daywalker90 wants to merge 2 commits into
ElementsProject:masterfrom
daywalker90:fix-payment-failinfo-groupid

Conversation

@daywalker90

Copy link
Copy Markdown
Collaborator

wallet_payment_set_failinfo() matched rows on payment_hash and partid
only, a leftover from before groupid became part of the payments key.
Every failed retry in a new group therefore overwrote the failure
details of all earlier failed groups with the same partid, so
waitsendpay (and erroronion in listsendpays/listpays) for an earlier
group reported the latest group's error.

Match on groupid too, like wallet_payment_set_status() and
wallet_payment_get_failinfo() already do.

Follow up from: #9731 pointed out by @nGoline

wallet_payment_set_failinfo() matches on payment_hash and partid but
not groupid, so when a retry in a new group fails, its failure details
overwrite those of every earlier failed group with the same partid.
A waitsendpay for the earlier group then reports the newer error.
wallet_payment_set_failinfo() matched rows on payment_hash and partid
only, a leftover from before groupid became part of the payments key.
Every failed retry in a new group therefore overwrote the failure
details of all earlier failed groups with the same partid, so
waitsendpay (and erroronion in listsendpays/listpays) for an earlier
group reported the latest group's error.

Match on groupid too, like wallet_payment_set_status() and
wallet_payment_get_failinfo() already do.

Changelog-Fixed: JSON-RPC: `waitsendpay` for an earlier `groupid` now reports that attempt's failure, not the failure of a later retry.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant