feat(traverse): prioritize Conway for tx decoding heuristics (#527)
This commit is contained in:
parent
537cd45c23
commit
061a7796d6
1 changed files with 2 additions and 2 deletions
|
|
@ -71,11 +71,11 @@ impl<'b> MultiEraTx<'b> {
|
||||||
/// decode using Babbage first even if Conway is newer.
|
/// decode using Babbage first even if Conway is newer.
|
||||||
pub fn decode(cbor: &'b [u8]) -> Result<Self, Error> {
|
pub fn decode(cbor: &'b [u8]) -> Result<Self, Error> {
|
||||||
if let Ok(tx) = minicbor::decode(cbor) {
|
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) {
|
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) {
|
if let Ok(tx) = minicbor::decode(cbor) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue