feat: add transactions_iter helper (#13910)

This commit is contained in:
Matthias Seitz
2025-01-22 00:37:51 +01:00
committed by GitHub
parent 6d2648dc1b
commit 901240877a
7 changed files with 23 additions and 22 deletions

View File

@ -553,8 +553,7 @@ impl<N: NodePrimitives> CanonicalInMemoryState<N> {
.block_ref()
.recovered_block()
.body()
.transactions()
.iter()
.transactions_iter()
.find(|tx| tx.trie_hash() == hash)
{
return Some(tx.clone())
@ -577,8 +576,7 @@ impl<N: NodePrimitives> CanonicalInMemoryState<N> {
.block_ref()
.recovered_block()
.body()
.transactions()
.iter()
.transactions_iter()
.enumerate()
.find(|(_, tx)| tx.trie_hash() == tx_hash)
{
@ -747,8 +745,7 @@ impl<N: NodePrimitives> BlockState<N> {
.block_ref()
.recovered_block()
.body()
.transactions()
.iter()
.transactions_iter()
.find(|tx| tx.trie_hash() == hash)
.cloned()
})
@ -767,8 +764,7 @@ impl<N: NodePrimitives> BlockState<N> {
.block_ref()
.recovered_block()
.body()
.transactions()
.iter()
.transactions_iter()
.enumerate()
.find(|(_, tx)| tx.trie_hash() == tx_hash)
.map(|(index, tx)| {