Start from last signed checkpoint (#292)

Co-authored-by: Asa Oines <asaoines@gmail.com>
pull/295/head
Nam Chu Hoai 3 years ago committed by GitHub
parent d40b1e4dc4
commit ae3c26189f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      rust/agents/validator/src/submit.rs

@ -36,8 +36,7 @@ impl ValidatorSubmitter {
let span = info_span!("ValidatorSubmitter");
let reorg_period = Some(self.reorg_period);
tokio::spawn(async move {
let starting_checkpoint = self.outbox.latest_checkpoint(reorg_period).await?;
let mut current_index = starting_checkpoint.index;
let mut current_index = self.checkpoint_syncer.latest_index().await?.unwrap_or_default();
loop {
sleep(Duration::from_secs(self.interval)).await;

Loading…
Cancel
Save