mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-26 07:38:59 -05:00
chore: use inmemory size functions for tx impl (#12802)
This commit is contained in:
@@ -14,10 +14,7 @@ use alloy_primitives::{
|
||||
keccak256, Address, Bytes, ChainId, PrimitiveSignature as Signature, TxHash, TxKind, B256, U256,
|
||||
};
|
||||
use alloy_rlp::{Decodable, Encodable, Error as RlpError, Header};
|
||||
use core::{
|
||||
hash::{Hash, Hasher},
|
||||
mem,
|
||||
};
|
||||
use core::hash::{Hash, Hasher};
|
||||
use derive_more::{AsRef, Deref};
|
||||
use once_cell as _;
|
||||
#[cfg(not(feature = "std"))]
|
||||
@@ -1461,7 +1458,7 @@ impl InMemorySize for TransactionSigned {
|
||||
/// Calculate a heuristic for the in-memory size of the [`TransactionSigned`].
|
||||
#[inline]
|
||||
fn size(&self) -> usize {
|
||||
mem::size_of::<TxHash>() + self.transaction.size() + mem::size_of::<Signature>()
|
||||
self.hash().size() + self.transaction.size() + self.signature().size()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user