From c424c426681378e0ec25edc8990f81190d216e89 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 8 Apr 2019 09:22:19 +0930 Subject: [PATCH] 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 --- gossipd/routing.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gossipd/routing.c b/gossipd/routing.c index 86fff7fde..0495b78d4 100644 --- a/gossipd/routing.c +++ b/gossipd/routing.c @@ -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