feat(traverse): prioritize Conway for tx decoding heuristics (#527)

This commit is contained in:
Santiago Carmuega 2024-10-22 10:27:56 -03:00 committed by GitHub
parent 537cd45c23
commit 061a7796d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) {