Skip to content

Commit

Permalink
fix: actually load proof id and increase poll limit (#2183)
Browse files Browse the repository at this point in the history
  • Loading branch information
justprosh authored Mar 18, 2024
1 parent 83f4346 commit fb8ccd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/chain-listener/src/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use crate::event::cc_activated::CommitmentActivated;
use crate::event::{ComputeUnitMatched, UnitActivated, UnitDeactivated};
use crate::persistence;

const PROOF_POLL_LIMIT: usize = 10;
const PROOF_POLL_LIMIT: usize = 50;

pub struct ChainListener {
config: ChainConfig,
Expand Down Expand Up @@ -376,6 +376,7 @@ impl ChainListener {
persistence::load_persisted_proof_id(&self.persisted_proof_id_dir).await?;

if let Some(persisted_proof_id) = persisted_proof_id {
self.last_submitted_proof_id = persisted_proof_id.proof_id;
tracing::info!(target: "chain-listener", "Loaded persisted proof id {} saved on epoch {}", persisted_proof_id.proof_id, persisted_proof_id.epoch);
if persisted_proof_id.epoch != self.current_epoch {
tracing::info!(target: "chain-listener","Persisted proof id epoch is different from current epoch {}, resetting proof id", self.current_epoch);
Expand Down

0 comments on commit fb8ccd3

Please sign in to comment.