mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59: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::Recovered;
|
||||||
use reth_primitives_traits::InMemorySize;
|
use reth_primitives_traits::InMemorySize;
|
||||||
use reth_transaction_pool::{
|
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 std::{collections::HashSet, sync::Arc};
|
||||||
use tokio::sync::mpsc::{self, Receiver};
|
use tokio::sync::mpsc::{self, Receiver};
|
||||||
|
|||||||
@ -49,13 +49,11 @@ pub struct HlBlockBody {
|
|||||||
|
|
||||||
impl InMemorySize for HlBlockBody {
|
impl InMemorySize for HlBlockBody {
|
||||||
fn size(&self) -> usize {
|
fn size(&self) -> usize {
|
||||||
self.inner.size()
|
self.inner.size() +
|
||||||
+ self
|
self.sidecars
|
||||||
.sidecars
|
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map_or(0, |s| s.capacity() * core::mem::size_of::<BlobTransactionSidecar>())
|
.map_or(0, |s| s.capacity() * core::mem::size_of::<BlobTransactionSidecar>()) +
|
||||||
+ self
|
self.read_precompile_calls
|
||||||
.read_precompile_calls
|
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map_or(0, |s| s.0.capacity() * core::mem::size_of::<ReadPrecompileCall>())
|
.map_or(0, |s| s.0.capacity() * core::mem::size_of::<ReadPrecompileCall>())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user