mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
chore: rustfmt
This commit is contained in:
@ -27,7 +27,10 @@ use reth_ethereum_primitives::PooledTransactionVariant;
|
||||
use reth_primitives::Recovered;
|
||||
use reth_primitives_traits::InMemorySize;
|
||||
use reth_transaction_pool::{
|
||||
error::InvalidPoolTransactionError, AllPoolTransactions, AllTransactionsEvents, BestTransactions, BestTransactionsAttributes, BlobStoreError, BlockInfo, EthPoolTransaction, GetPooledTransactionLimit, NewBlobSidecar, NewTransactionEvent, PropagatedTransactions, TransactionEvents, TransactionListenerKind, ValidPoolTransaction
|
||||
error::InvalidPoolTransactionError, AllPoolTransactions, AllTransactionsEvents,
|
||||
BestTransactions, BestTransactionsAttributes, BlobStoreError, BlockInfo, EthPoolTransaction,
|
||||
GetPooledTransactionLimit, NewBlobSidecar, NewTransactionEvent, PropagatedTransactions,
|
||||
TransactionEvents, TransactionListenerKind, ValidPoolTransaction,
|
||||
};
|
||||
use std::{collections::HashSet, sync::Arc};
|
||||
use tokio::sync::mpsc::{self, Receiver};
|
||||
|
||||
@ -49,13 +49,11 @@ pub struct HlBlockBody {
|
||||
|
||||
impl InMemorySize for HlBlockBody {
|
||||
fn size(&self) -> usize {
|
||||
self.inner.size()
|
||||
+ self
|
||||
.sidecars
|
||||
self.inner.size() +
|
||||
self.sidecars
|
||||
.as_ref()
|
||||
.map_or(0, |s| s.capacity() * core::mem::size_of::<BlobTransactionSidecar>())
|
||||
+ self
|
||||
.read_precompile_calls
|
||||
.map_or(0, |s| s.capacity() * core::mem::size_of::<BlobTransactionSidecar>()) +
|
||||
self.read_precompile_calls
|
||||
.as_ref()
|
||||
.map_or(0, |s| s.0.capacity() * core::mem::size_of::<ReadPrecompileCall>())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user