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

Splicing out funds should update router balances #2912

Open
pm47 opened this issue Sep 23, 2024 · 3 comments
Open

Splicing out funds should update router balances #2912

pm47 opened this issue Sep 23, 2024 · 3 comments
Labels

Comments

@pm47
Copy link
Member

pm47 commented Sep 23, 2024

Otherwise we will run into unexpected InsufficientFunds errors when relaying payments.

@remyers
Copy link
Contributor

remyers commented Dec 2, 2024

I looked at this as part of PR #2936. It appears when the availableBalanceForSend amount changes after a splice, it will generate an AvailableBalanceChanged event that updates channel balances on the router.

Could this have already been fixed in a different PR? or am I missing something about the situation that causes this issue?

@t-bast
Copy link
Member

t-bast commented Dec 2, 2024

It appears when the availableBalanceForSend amount changes after a splice,

I think this isn't sufficient: the code you're linking isn't triggered after a splice, it will only be triggered if we receive a new commit_sig after a splice has been confirmed (for example because an HTLC is added to the channel). But before that happens, we will still be using the pre-splice balances, which is an issue.

What we should probably do is emit an AvailableBalanceChanged event once we've exchanged splice_locked and are pruning the pre-splice commitments. I don't know if this should be part of #2936 or is independent.

@t-bast
Copy link
Member

t-bast commented Jan 3, 2025

I'm pretty sure this is fixed by #2968 (probably even already fixed in one of the previous PRs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants