Skip to content

Commit

Permalink
feat(traverse): prioritize Conway for tx decoding heuristics (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Oct 22, 2024
1 parent 537cd45 commit 061a779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pallas-traverse/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ impl<'b> MultiEraTx<'b> {
/// decode using Babbage first even if Conway is newer.
pub fn decode(cbor: &'b [u8]) -> Result<Self, Error> {
if let Ok(tx) = minicbor::decode(cbor) {
return Ok(MultiEraTx::Babbage(Box::new(Cow::Owned(tx))));
return Ok(MultiEraTx::Conway(Box::new(Cow::Owned(tx))));
}

if let Ok(tx) = minicbor::decode(cbor) {
return Ok(MultiEraTx::Conway(Box::new(Cow::Owned(tx))));
return Ok(MultiEraTx::Babbage(Box::new(Cow::Owned(tx))));
}

if let Ok(tx) = minicbor::decode(cbor) {
Expand Down

0 comments on commit 061a779

Please sign in to comment.