Skip to content

Commit 9343cdf

Browse files
committed
feat: all
1 parent ca5ffc3 commit 9343cdf

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,15 @@ impl ChainFollower {
361361

362362
#[cfg(test)]
363363
mod tests {
364+
use pallas::ledger::traverse::MultiEraBlockWithRawAuxiliary;
365+
364366
use super::*;
365367

366368
fn mock_block() -> MultiEraBlock {
367369
let raw_block = hex::decode(include_str!("./../test_data/shelley.block"))
368370
.expect("Failed to decode hex block.");
369371

370-
let pallas_block = pallas::ledger::traverse::MultiEraBlock::decode(raw_block.as_slice())
372+
let pallas_block = MultiEraBlockWithRawAuxiliary::decode(raw_block.as_slice())
371373
.expect("cannot decode block");
372374

373375
let previous_point = Point::new(

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::{
77
};
88

99
use logcall::logcall;
10+
use pallas::ledger::traverse::MultiEraBlockWithRawAuxiliary;
1011
use tokio::task;
1112
use tracing::{debug, error};
1213
use tracing_log::log;
@@ -85,7 +86,7 @@ impl MithrilSnapshotIterator {
8586

8687
match next {
8788
Some(Ok(raw_block)) => {
88-
let Ok(block) = pallas::ledger::traverse::MultiEraBlock::decode(&raw_block)
89+
let Ok(block) = MultiEraBlockWithRawAuxiliary::decode(&raw_block)
8990
else {
9091
return None;
9192
};
@@ -238,7 +239,7 @@ impl Iterator for MithrilSnapshotIteratorInner {
238239
// We cannot fully decode this block because we don't know its previous point,
239240
// So this MUST be the first block in iteration, so use it as the previous.
240241
if let Ok(raw_decoded_block) =
241-
pallas::ledger::traverse::MultiEraBlock::decode(&block)
242+
MultiEraBlockWithRawAuxiliary::decode(&block)
242243
{
243244
// debug!("Pre Previous update 2 : {:?}", self.previous);
244245
self.previous =

0 commit comments

Comments
 (0)