mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(primitives) : match exhaustive (#5316)
This commit is contained in:
committed by
GitHub
parent
c258659dd9
commit
6a5dbc4d0b
@ -96,14 +96,16 @@ impl Compact for TxType {
|
||||
0 => TxType::Legacy,
|
||||
1 => TxType::EIP2930,
|
||||
2 => TxType::EIP1559,
|
||||
_ => {
|
||||
let identifier = buf.get_u8() as usize;
|
||||
match identifier {
|
||||
3 => {
|
||||
let extended_identifier = buf.get_u8();
|
||||
match extended_identifier {
|
||||
EIP4844_TX_TYPE_ID => TxType::EIP4844,
|
||||
#[cfg(feature = "optimism")]
|
||||
126 => TxType::DEPOSIT,
|
||||
_ => TxType::EIP4844,
|
||||
DEPOSIT_TX_TYPE_ID => TxType::DEPOSIT,
|
||||
_ => panic!("Unsupported TxType identifier: {}", extended_identifier),
|
||||
}
|
||||
}
|
||||
_ => panic!("Unknown identifier for TxType: {}", identifier),
|
||||
},
|
||||
buf,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user