From b525207e5c2465eac031673ecbbbf8071a344577 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 12 Aug 2024 14:01:52 +0930 Subject: [PATCH] lightningd: track whether we're supposed to be throttling gossip. We're going to need this for the next commit. Signed-off-by: Rusty Russell --- lightningd/connect_control.c | 1 + lightningd/lightningd.c | 1 + lightningd/lightningd.h | 1 + 3 files changed, 3 insertions(+) diff --git a/lightningd/connect_control.c b/lightningd/connect_control.c index 508d1f839..f470d74cf 100644 --- a/lightningd/connect_control.c +++ b/lightningd/connect_control.c @@ -927,6 +927,7 @@ static struct command_result *json_dev_suppress_gossip(struct command *cmd, subd_send_msg(cmd->ld->connectd, take(towire_connectd_dev_suppress_gossip(NULL))); + cmd->ld->dev_suppress_gossip = true; return command_success(cmd, json_stream_success(cmd)); } diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index 1b5923582..06525772d 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -133,6 +133,7 @@ static struct lightningd *new_lightningd(const tal_t *ctx) ld->dev_fast_gossip = false; ld->dev_fast_gossip_prune = false; ld->dev_throttle_gossip = false; + ld->dev_suppress_gossip = false; ld->dev_fast_reconnect = false; ld->dev_force_privkey = NULL; ld->dev_force_bip32_seed = NULL; diff --git a/lightningd/lightningd.h b/lightningd/lightningd.h index 198361e0e..d13d509b7 100644 --- a/lightningd/lightningd.h +++ b/lightningd/lightningd.h @@ -313,6 +313,7 @@ struct lightningd { bool dev_fast_gossip; bool dev_fast_gossip_prune; bool dev_throttle_gossip; + bool dev_suppress_gossip; /* Speedup reconnect delay, for testing. */ bool dev_fast_reconnect;