-
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
Changes from all commits
3a1166f
368f0e8
649ae79
00b8bc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2279,6 +2279,17 @@ void routing_channel_spent(struct routing_state *rstate, | |
msg = towire_gossip_store_chan_dying(tmpctx, &chan->scid, deadline); | ||
index = gossip_store_add(rstate->gs, msg, 0, false, false, NULL); | ||
|
||
/* 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 commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
if (is_halfchan_defined(&chan->half[dir])) { | ||
gossip_store_mark_dying(rstate->gs, | ||
&chan->half[dir].bcast, | ||
WIRE_CHANNEL_UPDATE); | ||
} | ||
} | ||
|
||
/* Remember locally so we can kill it in 12 blocks */ | ||
status_debug("channel %s closing soon due" | ||
" to the funding outpoint being spent", | ||
|
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