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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-08-12 14:01:52 +09:30
parent 4886d228e7
commit b525207e5c
3 changed files with 3 additions and 0 deletions

View File

@ -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));
}

View File

@ -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;

View File

@ -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;