mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 08:34:20 +01:00
channeld: get told when announce depth already reached.
If channeld dies for some reason (eg, reconnect) and we didn't yet announce the channel, we can miss doing so. This is unusual, because if lightningd restarts it rearms the callback which gives us funding_locked, so it only happens if just channel dies before sending the announcement message. This problem applies to both temporary announcement (for gossipd) and the real one. For the temporary one, simply re-send on startup, and remote the error msg gossipd gives if it sees a second one. For the real one, we need a flag to tell us the depth is sufficient; the peer will ignore re-sends anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1516,8 +1516,9 @@ void handle_local_add_channel(struct routing_state *rstate, u8 *msg)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Can happen on channeld restart. */
|
||||
if (get_channel(rstate, &scid)) {
|
||||
status_broken("Attempted to local_add_channel a known channel");
|
||||
status_trace("Attempted to local_add_channel a known channel");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user