mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: make block field private (#13628)
This commit is contained in:
@ -254,7 +254,7 @@ impl<N: NodePrimitives> Chain<N> {
|
||||
self.blocks().iter().zip(self.execution_outcome.receipts().iter())
|
||||
{
|
||||
let mut tx_receipts = Vec::with_capacity(receipts.len());
|
||||
for (tx, receipt) in block.body.transactions().iter().zip(receipts.iter()) {
|
||||
for (tx, receipt) in block.body().transactions().iter().zip(receipts.iter()) {
|
||||
tx_receipts.push((
|
||||
tx.trie_hash(),
|
||||
receipt.as_ref().expect("receipts have not been pruned").clone(),
|
||||
@ -437,7 +437,7 @@ impl<B: Block<Body: BlockBody<Transaction: SignedTransaction>>> ChainBlocks<'_,
|
||||
/// Returns an iterator over all transactions in the chain.
|
||||
#[inline]
|
||||
pub fn transactions(&self) -> impl Iterator<Item = &<B::Body as BlockBody>::Transaction> + '_ {
|
||||
self.blocks.values().flat_map(|block| block.body.transactions().iter())
|
||||
self.blocks.values().flat_map(|block| block.body().transactions().iter())
|
||||
}
|
||||
|
||||
/// Returns an iterator over all transactions and their senders.
|
||||
|
||||
Reference in New Issue
Block a user