mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-03 22:34:21 +01:00
gossipd: simplify seeker state machine.
We eliminate the "need peer" states and instead check if the random_peer_softref has been cleared. We can also unify our restart handlers for all these cases; even the probe_scids case, by giving gossip credit for the scids as they come in (at a discount, since scids are 8 bytes vs the ~200 bytes for normal gossip messages). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
918478b0ef
commit
869b5e40b5
@@ -2178,7 +2178,7 @@ bool routing_add_channel_update(struct routing_state *rstate,
|
||||
= gossip_store_add(rstate->gs, update,
|
||||
hc->bcast.timestamp,
|
||||
NULL);
|
||||
peer_supplied_good_gossip(peer);
|
||||
peer_supplied_good_gossip(peer, 1);
|
||||
}
|
||||
|
||||
if (uc) {
|
||||
@@ -2497,7 +2497,7 @@ bool routing_add_node_announcement(struct routing_state *rstate,
|
||||
node->bcast.index
|
||||
= gossip_store_add(rstate->gs, msg,
|
||||
node->bcast.timestamp, NULL);
|
||||
peer_supplied_good_gossip(peer);
|
||||
peer_supplied_good_gossip(peer, 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user