gossip: Wrap channel_updates in the gossip_store as well

Bypasses verification when loading from the gossip_store.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2018-03-25 18:10:00 +02:00
committed by Rusty Russell
parent 6e01f38d7d
commit db13c7e851
6 changed files with 40 additions and 2 deletions

View File

@@ -1029,8 +1029,9 @@ u8 *handle_channel_update(struct routing_state *rstate, const u8 *update,
flags & 0x01,
flags & ROUTING_FLAGS_DISABLED ? "DISABLED" : "ACTIVE");
if (store)
gossip_store_append(rstate->store, serialized);
/* Only store updates for public channels */
if (chan->public)
gossip_store_add_channel_update(rstate->store, serialized);
routing_add_channel_update(rstate, serialized);
return NULL;
}