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

check historical payments on startup #37

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

JssDWt
Copy link
Collaborator

@JssDWt JssDWt commented Feb 1, 2025

If a payment attempt is started, but the process is killed before the
payment is completed, the swap will remain locked for payment. On
startup, uncompleted payments are checked. If the payment is no longer
inflight, the swap will be unlocked.

@JssDWt JssDWt marked this pull request as draft February 1, 2025 21:29
@JssDWt JssDWt force-pushed the jssdwt-all-payment-results branch from 99fcccc to 1c5eed5 Compare February 3, 2025 08:41
If a payment attempt is started, but the process is killed before the
payment is completed, the swap will remain locked for payment. On
startup, uncompleted payments are checked. If the payment is no longer
inflight, the swap will be unlocked.
If the payment attempt and lock are not added in a transaction, the
payment monitor has to contain logic to distinguish when a payment was
locked but an attempt was not added. By putting these in a transaction,
the payment is always locked when a payment attempt is added, and always
unlocked when the payment result is added. Making it easier to determine
which payment attempts are stale.
@JssDWt JssDWt force-pushed the jssdwt-all-payment-results branch from 1c5eed5 to 57564f1 Compare February 3, 2025 09:31
@JssDWt JssDWt marked this pull request as ready for review February 3, 2025 09:51
@JssDWt JssDWt changed the base branch from jssdwt-relative-timelock to main February 3, 2025 10:00
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