Skip to content
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

Purge pending incoming payments on disconnection #583

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Jan 18, 2024

We were keeping pending incoming payments in the internal state of the IncomingPaymentHandler even when disconnected. This could lead to inconsistencies with the channel state: if an HTLC that was added to the IncomingPaymentHandler was failed by another instance of the app (for example a background task), that failure wouldn't propagate to the state of the IncomingPaymentHandler. This can lead to partially fulfilled payments, where we think we have received the complete payment, but one of the part was actually failed so we shouldn't release the preimage.

We were keeping pending incoming payments in the internal state of the
`IncomingPaymentHandler` even when disconnected. This could lead to
inconsistencies with the channel state: if an HTLC that was added to the
`IncomingPaymentHandler` was failed by another instance of the app (for
example a background task), that failure wouldn't propagate to the state
of the `IncomingPaymentHandler`. This can lead to partially fulfilled
payments, where we think we have received the complete payment, but one
of the part was actually failed so we shouldn't release the preimage.
@t-bast t-bast merged commit e3c90bf into master Jan 18, 2024
2 checks passed
@t-bast t-bast deleted the mitigate-partial-receive-parallel-apps branch January 18, 2024 16:30
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.

2 participants