mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add SealedBlock in reth-primitives-traits (#13735)
This commit is contained in:
@ -6,7 +6,11 @@ use std::{
|
||||
|
||||
use alloy_primitives::BlockNumber;
|
||||
use futures_util::{FutureExt, TryStreamExt};
|
||||
use reth::{api::FullNodeComponents, builder::NodeTypes, primitives::EthPrimitives};
|
||||
use reth::{
|
||||
api::{BlockBody, FullNodeComponents},
|
||||
builder::NodeTypes,
|
||||
primitives::EthPrimitives,
|
||||
};
|
||||
use reth_exex::{ExExContext, ExExEvent};
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
use reth_tracing::tracing::info;
|
||||
@ -36,7 +40,7 @@ impl<Node: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>>> Fut
|
||||
while let Some(notification) = ready!(this.ctx.notifications.try_next().poll_unpin(cx))? {
|
||||
if let Some(reverted_chain) = notification.reverted_chain() {
|
||||
this.transactions = this.transactions.saturating_sub(
|
||||
reverted_chain.blocks_iter().map(|b| b.body().transactions.len() as u64).sum(),
|
||||
reverted_chain.blocks_iter().map(|b| b.body().transaction_count() as u64).sum(),
|
||||
);
|
||||
}
|
||||
|
||||
@ -45,7 +49,7 @@ impl<Node: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>>> Fut
|
||||
|
||||
this.transactions += committed_chain
|
||||
.blocks_iter()
|
||||
.map(|b| b.body().transactions.len() as u64)
|
||||
.map(|b| b.body().transaction_count() as u64)
|
||||
.sum::<u64>();
|
||||
|
||||
this.ctx
|
||||
|
||||
Reference in New Issue
Block a user