Skip to content

Commit 9a40769

Browse files
committed
chore(cardano-node-chain): add more context when block parsing fails
1 parent acdf09a commit 9a40769

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/cardano-node/mithril-cardano-node-chain/src/chain_reader/pallas_chain_reader.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ impl PallasChainReader {
9595
) -> StdResult<Option<ChainBlockNextAction>> {
9696
match next {
9797
NextResponse::RollForward(raw_block, _forward_tip) => {
98-
let multi_era_block = MultiEraBlock::decode(&raw_block)
99-
.with_context(|| "PallasChainReader failed to decode raw block")?;
98+
let multi_era_block = MultiEraBlock::decode(&raw_block).with_context(|| {
99+
format!("PallasChainReader failed to decode raw block: {raw_block:#?}")
100+
})?;
100101
let parsed_block = ScannedBlock::convert(multi_era_block);
101102
Ok(Some(ChainBlockNextAction::RollForward { parsed_block }))
102103
}

0 commit comments

Comments
 (0)