mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
connectd: no longer stream our own generated gossip, let gossipd do it.
This removes the sweep logic as soon as they connect. This should save connectd a significant number of CPU cycles and make @whitslack finally stop hitting me. Changelog-Changed: `connectd` no longer sweeps gossip_store file when peer connects, saving CPU for large nodes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
46bb6beee7
commit
00f75d6ee1
1 changed files with 0 additions and 17 deletions
|
@ -505,23 +505,6 @@ static u8 *maybe_from_gossip_store(const tal_t *ctx, struct peer *peer)
|
|||
if (IFDEV(peer->daemon->dev_suppress_gossip, false))
|
||||
return NULL;
|
||||
|
||||
/* BOLT #7:
|
||||
* - if the `gossip_queries` feature is negotiated:
|
||||
* - MUST NOT relay any gossip messages it did not generate itself,
|
||||
* unless explicitly requested.
|
||||
*/
|
||||
|
||||
/* So, even if they didn't send us a timestamp_filter message,
|
||||
* we *still* send our own gossip. */
|
||||
if (!peer->gs.gossip_timer) {
|
||||
return gossip_store_next(ctx, &peer->daemon->gossip_store_fd,
|
||||
0, 0xFFFFFFFF,
|
||||
true,
|
||||
false,
|
||||
&peer->gs.off,
|
||||
&peer->daemon->gossip_store_end);
|
||||
}
|
||||
|
||||
/* Not streaming right now? */
|
||||
if (!peer->gs.active)
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue