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 6b85c29
Show file tree
Hide file tree
Showing 2 changed files with 5 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

0 comments on commit 6b85c29

Please sign in to comment.