From 9805589e7bf432cc6358760f5adc5364b07b9103 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Wed, 16 Apr 2025 04:19:51 +0000 Subject: [PATCH] chore: Cleanup diffs before changes --- crates/ethereum/primitives/src/transaction.rs | 20 +++++++++---------- crates/rpc/rpc/src/eth/helpers/types.rs | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/ethereum/primitives/src/transaction.rs b/crates/ethereum/primitives/src/transaction.rs index bbd71f9de..ffc0145e1 100644 --- a/crates/ethereum/primitives/src/transaction.rs +++ b/crates/ethereum/primitives/src/transaction.rs @@ -332,9 +332,9 @@ impl Hash for TransactionSigned { impl PartialEq for TransactionSigned { fn eq(&self, other: &Self) -> bool { - self.signature == other.signature - && self.transaction == other.transaction - && self.tx_hash() == other.tx_hash() + self.signature == other.signature && + self.transaction == other.transaction && + self.tx_hash() == other.tx_hash() } } @@ -582,13 +582,13 @@ impl<'a> arbitrary::Arbitrary<'a> for TransactionSigned { ) .unwrap(); - Ok(Self { transaction, signature, ..Default::default() }) + Ok(Self { transaction, signature, hash: Default::default() }) } } impl InMemorySize for TransactionSigned { fn size(&self) -> usize { - let Self { hash: _, signature, transaction, .. } = self; + let Self { hash: _, signature, transaction } = self; self.tx_hash().size() + signature.size() + transaction.size() } } @@ -617,26 +617,26 @@ impl Decodable2718 for TransactionSigned { TxType::Legacy => Err(Eip2718Error::UnexpectedType(0)), TxType::Eip2930 => { let (tx, signature) = TxEip2930::rlp_decode_with_signature(buf)?; - Ok(Self { transaction: Transaction::Eip2930(tx), signature, ..Default::default() }) + Ok(Self { transaction: Transaction::Eip2930(tx), signature, hash: Default::default() }) } TxType::Eip1559 => { let (tx, signature) = TxEip1559::rlp_decode_with_signature(buf)?; - Ok(Self { transaction: Transaction::Eip1559(tx), signature, ..Default::default() }) + Ok(Self { transaction: Transaction::Eip1559(tx), signature, hash: Default::default() }) } TxType::Eip4844 => { let (tx, signature) = TxEip4844::rlp_decode_with_signature(buf)?; - Ok(Self { transaction: Transaction::Eip4844(tx), signature, ..Default::default() }) + Ok(Self { transaction: Transaction::Eip4844(tx), signature, hash: Default::default() }) } TxType::Eip7702 => { let (tx, signature) = TxEip7702::rlp_decode_with_signature(buf)?; - Ok(Self { transaction: Transaction::Eip7702(tx), signature, ..Default::default() }) + Ok(Self { transaction: Transaction::Eip7702(tx), signature, hash: Default::default() }) } } } fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result { let (tx, signature) = TxLegacy::rlp_decode_with_signature(buf)?; - Ok(Self { transaction: Transaction::Legacy(tx), signature, ..Default::default() }) + Ok(Self { transaction: Transaction::Legacy(tx), signature, hash: Default::default() }) } } diff --git a/crates/rpc/rpc/src/eth/helpers/types.rs b/crates/rpc/rpc/src/eth/helpers/types.rs index 6ecce995a..cfd966441 100644 --- a/crates/rpc/rpc/src/eth/helpers/types.rs +++ b/crates/rpc/rpc/src/eth/helpers/types.rs @@ -72,7 +72,7 @@ where request: TransactionRequest, ) -> Result { let Ok(tx) = request.build_typed_tx() else { - return Err(EthApiError::TransactionConversionError); + return Err(EthApiError::TransactionConversionError) }; // Create an empty signature for the transaction.