-
Notifications
You must be signed in to change notification settings - Fork 906
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
Don't gossip about recently-closed channels #6413
Don't gossip about recently-closed channels #6413
Conversation
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We don't actually delete them for 12 blocks, but we can't avoid propagating them. We don't mark node_announcements, which is a bit weird, but avoids us tracking logic to un-dying them if a channel is opened. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: ElementsProject#6368 Changelog-Fixed: Protocol: we no longer gossip about recently-closed channels (Eclair gets upset with this). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice. I think the unit test updates should fall out in the rebase.
The spec doesn't say anything about not gossiping dying channels. Is this a temporary accommodation for Eclair, or should we discuss clarifying the spec on this?
ACK 00b8bc9
/* Mark it dying, so we don't gossip it */ | ||
gossip_store_mark_dying(rstate->gs, &chan->bcast, | ||
WIRE_CHANNEL_ANNOUNCEMENT); | ||
for (int dir = 0; dir < ARRAY_SIZE(chan->half); dir++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ARRAY_SIZE(chan->half)
generally preferred over 2
? (Just so I can stay consistent)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're explicitly iterating over the chan->half array, ARRAY_SIZE makes sense here?
/* Should never try to overwrite version */ | ||
assert(bcast->index); | ||
|
||
/* Sanity check, that this is a channel announcement */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...or update, as appropriate
No description provided.