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

delete pending payments unknown to the node #1140

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

JssDWt
Copy link
Contributor

@JssDWt JssDWt commented Dec 5, 2024

Before sending out a payment, the sdk inserts a pseudo payment. This
ensures there is always a pending payment shown on clients directly when
paying. If the call to send_payment never resulted in in actual payment
being sent, these payments would sit in the database forever and never
be deleted. Pseudo payments are now marked as pseudo in the database. On
sync pseudo payments are deleted before inserting the updated payments
from the node.

Existing payments and sync state are dropped in case the client's
database already contained pending payments because of this issue.

Fixes #1139

@JssDWt JssDWt requested review from dangeross and roeierez December 5, 2024 09:19
@JssDWt JssDWt force-pushed the jssdwt-remove-pending-payments branch from 800bdeb to 2c5548a Compare December 5, 2024 13:14
@JssDWt JssDWt requested a review from roeierez December 5, 2024 13:17
@JssDWt
Copy link
Contributor Author

JssDWt commented Dec 5, 2024

Updated to treat the payment inserted before sending the actual payment as a 'pseudo' payment.

Before sending out a payment, the sdk inserts a pseudo payment. This
ensures there is always a pending payment shown on clients directly when
paying. If the call to send_payment never resulted in in actual payment
being sent, these payments would sit in the database forever and never
be deleted. Pseudo payments are now marked as pseudo in the database. On
sync pseudo payments are deleted before inserting the updated payments
from the node.

Existing payments and sync state are dropped in case the client's
database already contained pending payments because of this issue.
@JssDWt JssDWt force-pushed the jssdwt-remove-pending-payments branch from 2c5548a to 2d69ba4 Compare December 5, 2024 18:27
@JssDWt JssDWt merged commit 2d69ba4 into main Dec 5, 2024
9 checks passed
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.

Pre-payment pending payments are not automatically removed
3 participants