Skip to content

Commit 29cb60d

Browse files
authored
fix: log error instead of panic in chain follower (#5772)
1 parent 83ef86b commit 29cb60d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/chain_sync/chain_follower.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,11 @@ impl<DB: Blockstore> SyncStateMachine<DB> {
725725
}
726726

727727
fn mark_validated_tipset(&mut self, tipset: Arc<FullTipset>, is_proposed_head: bool) {
728-
assert!(self.is_validated(&tipset), "Tipset must be validated");
728+
if !self.is_validated(&tipset) {
729+
tracing::error!(epoch = %tipset.epoch(), tsk = %tipset.key(), "Tipset must be validated");
730+
return;
731+
}
732+
729733
self.tipsets.remove(tipset.key());
730734
let tipset = tipset.deref().clone().into_tipset();
731735
// cs.put_tipset requires state and doesn't work in stateless mode

0 commit comments

Comments
 (0)