diff --git a/node/actors/executor/src/lib.rs b/node/actors/executor/src/lib.rs index 76c19a4cf..adaf4016f 100644 --- a/node/actors/executor/src/lib.rs +++ b/node/actors/executor/src/lib.rs @@ -70,6 +70,9 @@ pub struct Config { /// Http debug page configuration. /// If None, debug page is disabled pub debug_page: Option, + + /// How often to poll the database looking for the batch commitment. + pub batch_poll_interval: time::Duration, } impl Config { @@ -153,7 +156,7 @@ impl Executor { attester, net.batch_vote_publisher(), self.attestation_status.subscribe(), - time::Duration::seconds(1), // TODO: Move to config? + self.config.batch_poll_interval, ); s.spawn(async { runner.run(ctx).await?; diff --git a/node/actors/executor/src/tests.rs b/node/actors/executor/src/tests.rs index 491c19b30..6ce5c057c 100644 --- a/node/actors/executor/src/tests.rs +++ b/node/actors/executor/src/tests.rs @@ -23,6 +23,7 @@ fn config(cfg: &network::Config) -> Config { gossip_static_outbound: cfg.gossip.static_outbound.clone(), rpc: cfg.rpc.clone(), debug_page: None, + batch_poll_interval: time::Duration::seconds(1), } }