Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: actually load proof id and increase poll limit #2183

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading