Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion rust/cardano-chain-follower/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cardano-chain-follower"
version = "0.0.18"
version = "0.0.19"
edition.workspace = true
authors.workspace = true
homepage.workspace = true
Expand Down
13 changes: 11 additions & 2 deletions rust/cardano-chain-follower/src/mithril_snapshot_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,17 @@ impl MithrilSnapshotIterator {
from: &Point,
previous_point: Option<Point>,
) -> Result<Self> {
// If "from" is 0, it is origin.
// This is added to avoid the case where point 0 is considered
// as fuzzy and not origin.
let from = if from.slot_or_default() == 0.into() {
Point::ORIGIN
} else {
from.clone()
};

if from.is_fuzzy() || (!from.is_origin() && previous_point.is_none()) {
return Ok(Self::fuzzy_iterator(chain, path, from).await);
return Ok(Self::fuzzy_iterator(chain, path, &from).await);
}

let previous = if from.is_origin() {
Expand All @@ -202,7 +211,7 @@ impl MithrilSnapshotIterator {

debug!("Actual Mithril Iterator Start: {}", from);

let iterator = make_mithril_iterator(path, from, chain).await?;
let iterator = make_mithril_iterator(path, &from, chain).await?;

Ok(MithrilSnapshotIterator {
path: path.to_path_buf(),
Expand Down