mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-10 06:55:10 -05:00
fix: ambiguous deposit mint value in arbitrary (#9216)
This commit is contained in:
@@ -1478,6 +1478,16 @@ impl<'a> arbitrary::Arbitrary<'a> for TransactionSigned {
|
||||
if tx_eip_4844.to != Address::default() { Some(()) } else { None };
|
||||
}
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
// Both `Some(0)` and `None` values are encoded as empty string byte. This introduces
|
||||
// ambiguity in roundtrip tests. Patch the mint value of deposit transaction here, so that
|
||||
// it's `None` if zero.
|
||||
if let Transaction::Deposit(ref mut tx_deposit) = transaction {
|
||||
if tx_deposit.mint == Some(0) {
|
||||
tx_deposit.mint = None;
|
||||
}
|
||||
}
|
||||
|
||||
let signature = Signature::arbitrary(u)?;
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
|
||||
Reference in New Issue
Block a user