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

swap: exclude non-active swap in csvPassedCallback #316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YusukeShimizu
Copy link
Contributor

@YusukeShimizu YusukeShimizu commented Sep 18, 2024

csv wait list is always added in AwaitPaymentOrCsvAction state but removed only after csvPassedCallback.

csvPassedCallback always assumes an active swap, but in normal flows like preimage path, the swap might be complete,
leaving no active swap at this point.
This was not considered before, causing continuous errors.

Previously, if a swap was completed through means other than the CSV path, an error message csv passed callback err: swap does not exist. would occur unless the peerswap daemon was restarted.
I have confirmed that this issue no longer occurs.

csv wait list is always added in AwaitPaymentOrCsvAction state
 but removed only after csvPassedCallback.

csvPassedCallback always assumes an active swap, but in normal flows
like preimage path, the swap might be complete,
leaving no active swap at this point.
This was not considered before, causing continuous errors.
@YusukeShimizu YusukeShimizu marked this pull request as ready for review September 18, 2024 07:31
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