Skip to content

Commit

Permalink
BFT-496: Move the DB poll interval to Executor Config
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed Jul 30, 2024
1 parent 05ef820 commit 45f8d9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion node/actors/executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ pub struct Config {
/// Http debug page configuration.
/// If None, debug page is disabled
pub debug_page: Option<http::DebugPageConfig>,

/// How often to poll the database looking for the batch commitment.
pub batch_poll_interval: time::Duration,
}

impl Config {
Expand Down Expand Up @@ -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?;
Expand Down
1 change: 1 addition & 0 deletions node/actors/executor/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}

Expand Down
1 change: 1 addition & 0 deletions node/tools/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 45f8d9b

Please sign in to comment.