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

lightningd: handle duplicate watches on the same thing correctly. #7567

Merged

Conversation

rustyrussell
Copy link
Contributor

Our hash tables allow duplicate keys, and we use that in a few places. However, the get() function only returns the first, so it's not a good idea with such hash tables.

Another patch fixes this at a deeper level (using different hash table types depending on whether this table can have duplicates), but this is the minimal fix for existing code.

This may be the cause behind us occasionally missing onchain events:

Fixes: #7460
Fixes: #7377
Fixes: #7118
Fixes: #6951

This fixes them in future: fixing them now will require something else.

Changelog-Fixed: lightningd: occasionally we could miss transaction outputs (not telling gossipd, or even onchaind)

Our hash tables allow duplicate keys, and we use that in a few places.
However, the get() function only returns the first, so it's not a good
idea with such hash tables.

Another patch fixes this at a deeper level (using different hash table
types depending on whether this table can have duplicates), but this
is the minimal fix for existing code.

This may be the cause behind us occasionally missing onchain events:

Fixes: ElementsProject#7460
Fixes: ElementsProject#7377
Fixes: ElementsProject#7118
Fixes: ElementsProject#6951

This fixes them in future: fixing them now will require something else.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: lightningd: occasionally we could miss transaction outputs (not telling gossipd, or even onchaind)
@rustyrussell rustyrussell added this to the v24.08 milestone Aug 13, 2024
@cdecker
Copy link
Member

cdecker commented Aug 13, 2024

ACK 20bcebd

@ShahanaFarooqui ShahanaFarooqui merged commit a2b0212 into ElementsProject:master Aug 13, 2024
37 checks passed
@marko3dana
Copy link

This fixes them in future: fixing them now will require something else.

And how to fix it now ?
I have one force close channel waiting for TX (that is actually confirmed)... to be confirmed..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment