Skip to content

Commit 8b9f82c

Browse files
committed
fix(cardano-blockchain-types): cleanup
Signed-off-by: bkioshn <[email protected]>
1 parent 06fbfa1 commit 8b9f82c

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

rust/cardano-chain-follower/src/chain_sync_live_chains.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl ProtectedLiveChainBlockList {
346346

347347
// Loop until we exhaust probe slots, OR we would step past genesis.
348348
while slot_age < reference_slot {
349-
let ref_point = Point::fuzzy((reference_slot - slot_age).into());
349+
let ref_point = Point::fuzzy(reference_slot - slot_age);
350350
let Some(entry) = chain.lower_bound(Bound::Included(&ref_point)) else {
351351
break;
352352
};
@@ -372,7 +372,7 @@ impl ProtectedLiveChainBlockList {
372372
};
373373

374374
// Get the block <= the current slot.
375-
let ref_point = Point::fuzzy(point.slot_or_default().into());
375+
let ref_point = Point::fuzzy(point.slot_or_default());
376376
let mut entry = chain.upper_bound(Bound::Included(&ref_point))?;
377377

378378
let mut this_block = entry.value().clone();

rust/cardano-chain-follower/src/follow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ impl ChainFollower {
313313

314314
let tips = Statistics::tips(chain);
315315

316-
let mithril_tip = Point::fuzzy(tips.0.into());
317-
let live_tip = Point::fuzzy(tips.1.into());
316+
let mithril_tip = Point::fuzzy(tips.0);
317+
let live_tip = Point::fuzzy(tips.1);
318318

319319
(mithril_tip, live_tip)
320320
}

rust/cardano-chain-follower/src/mithril_snapshot_iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub(crate) fn probe_point(point: &Point, distance: u64) -> Point {
6262
}
6363

6464
// Create a fuzzy search probe by making the hash zero length.
65-
Point::fuzzy(step_back_search.into())
65+
Point::fuzzy(step_back_search)
6666
}
6767

6868
impl MithrilSnapshotIterator {

rust/cardano-chain-follower/src/stats.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ impl Statistics {
292292
}
293293

294294
/// Count the invalidly deserialized blocks
295+
#[allow(dead_code)]
295296
pub(crate) fn stats_invalid_block(chain: Network, immutable: bool) {
296297
// This will actually always succeed.
297298
let Some(stats) = lookup_stats(chain) else {

0 commit comments

Comments
 (0)