We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3f33b4 commit f13b703Copy full SHA for f13b703
rust/cardano-chain-follower/src/follow.rs
@@ -109,9 +109,13 @@ impl ChainFollower {
109
}
110
111
112
- if (self.mithril_tip.is_none() || current_mithril_tip > self.mithril_tip)
113
- && self.current < self.mithril_tip
114
- {
+ let roll_forward_condition = if let Some(mithril_tip) = &self.mithril_tip {
+ current_mithril_tip > *mithril_tip && *mithril_tip > self.current
+ } else {
115
+ true
116
+ };
117
+
118
+ if roll_forward_condition {
119
let snapshot = MithrilSnapshot::new(self.chain);
120
if let Some(block) = snapshot.read_block_at(¤t_mithril_tip).await {
121
// The Mithril Tip has moved forwards.
0 commit comments