mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-12 01:24:23 +01:00
gossipd: store local channel updates across restart, even if unannounced.
Either private or simply not enough confirms. They would have been added on reconnect, but that's not ideal. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1192,9 +1192,13 @@ bool routing_add_channel_update(struct routing_state *rstate,
|
||||
= tal_dup_arr(chan, u8, update, tal_count(update), 0);
|
||||
|
||||
/* For private channels, we get updates without an announce: don't
|
||||
* broadcast them! */
|
||||
if (!chan->channel_announce)
|
||||
* broadcast them! But save local ones to store anyway. */
|
||||
if (!chan->channel_announce) {
|
||||
if (is_local_channel(rstate, chan))
|
||||
gossip_store_add(rstate->store,
|
||||
chan->half[direction].channel_update);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* BOLT #7:
|
||||
* - MUST consider the `timestamp` of the `channel_announcement` to be
|
||||
|
||||
Reference in New Issue
Block a user