chore: make block field private (#13628)

This commit is contained in:
Matthias Seitz
2025-01-03 16:10:32 +01:00
committed by GitHub
parent 82013f46da
commit dbd4f0c4fe
67 changed files with 317 additions and 291 deletions

View File

@ -36,7 +36,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().transactions.len() as u64).sum(),
);
}
@ -45,7 +45,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().transactions.len() as u64)
.sum::<u64>();
this.ctx