mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
connectd: optimize case where peer doesn't want gossip.
LND and us send 0xFFFFFFFF to turn off gossip. LDK and Eclair don't seem to turn off gossip at all, but that's OK. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
50180e040c
commit
92fe871467
1 changed files with 6 additions and 1 deletions
|
@ -632,7 +632,12 @@ static void handle_gossip_timestamp_filter_in(struct peer *peer, const u8 *msg)
|
|||
if (peer->gs.timestamp_max < peer->gs.timestamp_min)
|
||||
peer->gs.timestamp_max = UINT32_MAX;
|
||||
|
||||
peer->gs.off = 1;
|
||||
/* Optimization: they don't want anything. LND and us (at least),
|
||||
* both set first_timestamp to 0xFFFFFFFF to indicate that. */
|
||||
if (peer->gs.timestamp_min == UINT32_MAX)
|
||||
peer->gs.off = peer->daemon->gossip_store_end;
|
||||
else
|
||||
peer->gs.off = 1;
|
||||
|
||||
/* BOLT #7:
|
||||
* - MAY wait for the next outgoing gossip flush to send these.
|
||||
|
|
Loading…
Add table
Reference in a new issue