diff --git a/gossipd/routing.c b/gossipd/routing.c index 7e55a04d7a8d..47f9bb9dc576 100644 --- a/gossipd/routing.c +++ b/gossipd/routing.c @@ -936,7 +936,7 @@ bool routing_add_channel_announcement(struct routing_state *rstate, struct pubkey bitcoin_key_1; struct pubkey bitcoin_key_2; struct unupdated_channel *uc; - const u8 *private_updates[2] = { NULL, NULL }; + // const u8 *private_updates[2] = { NULL, NULL }; /* Make sure we own msg, even if we don't save it. */ if (taken(msg)) @@ -965,17 +965,17 @@ bool routing_add_channel_announcement(struct routing_state *rstate, return false; } - /* Reload any private updates */ - if (oldchan->half[0].bcast.index) - private_updates[0] - = gossip_store_get_private_update(NULL, - rstate->gs, - oldchan->half[0].bcast.index); - if (oldchan->half[1].bcast.index) - private_updates[1] - = gossip_store_get_private_update(NULL, - rstate->gs, - oldchan->half[1].bcast.index); + // /* Reload any private updates */ + // if (oldchan->half[0].bcast.index) + // private_updates[0] + // = gossip_store_get_private_update(NULL, + // rstate->gs, + // oldchan->half[0].bcast.index); + // if (oldchan->half[1].bcast.index) + // private_updates[1] + // = gossip_store_get_private_update(NULL, + // rstate->gs, + // oldchan->half[1].bcast.index); /* We don't delete it from store until *after* we've put the * other one in! */ @@ -999,12 +999,12 @@ bool routing_add_channel_announcement(struct routing_state *rstate, catch_node_announcement(uc, rstate, &node_id_2); /* If we had private updates, they'll immediately create the channel. */ - if (private_updates[0]) - routing_add_channel_update(rstate, take(private_updates[0]), 0, - source_peer, false, false, false); - if (private_updates[1]) - routing_add_channel_update(rstate, take(private_updates[1]), 0, - source_peer, false, false, false); + // if (private_updates[0]) + // routing_add_channel_update(rstate, take(private_updates[0]), 0, + // source_peer, false, false, false); + // if (private_updates[1]) + // routing_add_channel_update(rstate, take(private_updates[1]), 0, + // source_peer, false, false, false); /* Now we can finish cleanup of gossip store, so there's no window where * channel (or nodes) vanish. */ @@ -1558,18 +1558,18 @@ bool routing_add_channel_update(struct routing_state *rstate, /* For private channels, we get updates without an announce: don't * broadcast them! But save local ones to store anyway. */ assert(local_direction(rstate, chan, NULL)); - /* Don't save if we're loading from store */ - if (!index) { - hc->bcast.index - = gossip_store_add_private_update(rstate->gs, - update); - /* No need to separately track spam for private - * channels. */ - hc->rgraph.index = hc->bcast.index; - } else { - hc->bcast.index = index; - hc->rgraph.index = index; - } + // /* Don't save if we're loading from store */ + // if (!index) { + // hc->bcast.index + // = gossip_store_add_private_update(rstate->gs, + // update); + // /* No need to separately track spam for private + // * channels. */ + // hc->rgraph.index = hc->bcast.index; + // } else { + // hc->bcast.index = index; + // hc->rgraph.index = index; + // } if (!source_peer) return true; /* give lightningd the channel's inbound info to store to db */