fix: better error logging when decoding tx_bytes by era

This commit is contained in:
Calvin Koepke 2025-02-13 09:52:34 -07:00 committed by Lucas
parent 21c6a6a71d
commit 90867f240b
1 changed files with 2 additions and 2 deletions

View File

@ -100,8 +100,8 @@ pub fn eval_phase_two_raw(
with_redeemer: fn(&Redeemer) -> (), with_redeemer: fn(&Redeemer) -> (),
) -> Result<Vec<Vec<u8>>, Error> { ) -> Result<Vec<Vec<u8>>, Error> {
let multi_era_tx = MultiEraTx::decode_for_era(Era::Conway, tx_bytes) let multi_era_tx = MultiEraTx::decode_for_era(Era::Conway, tx_bytes)
.or_else(|_| MultiEraTx::decode_for_era(Era::Babbage, tx_bytes)) .or_else(|e| MultiEraTx::decode_for_era(Era::Babbage, tx_bytes).map_err(|_| e))
.or_else(|_| MultiEraTx::decode_for_era(Era::Alonzo, tx_bytes))?; .or_else(|e| MultiEraTx::decode_for_era(Era::Alonzo, tx_bytes).map_err(|_| e))?;
let cost_mdls = cost_mdls_bytes let cost_mdls = cost_mdls_bytes
.map(CostModels::decode_fragment) .map(CostModels::decode_fragment)