diff --git a/node/actors/executor/src/lib.rs b/node/actors/executor/src/lib.rs index 76c19a4c..adaf4016 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 491c19b3..6ce5c057 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), } } diff --git a/node/tools/src/config.rs b/node/tools/src/config.rs index 24897611..f659bdb3 100644 --- a/node/tools/src/config.rs +++ b/node/tools/src/config.rs @@ -298,6 +298,7 @@ impl Configs { .expect("Could not obtain private key for debug page"), } }), + batch_poll_interval: time::Duration::seconds(1), }, block_store: store.blocks, batch_store: store.batches,