From f624372334052b6da9a793cfd6b0a5f3d85c790e Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 17 Jan 2026 19:20:28 +0100 Subject: [PATCH] feat(execution-types): add receipts_iter helper (#21162) Co-authored-by: Amp --- crates/evm/execution-types/src/execution_outcome.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/evm/execution-types/src/execution_outcome.rs b/crates/evm/execution-types/src/execution_outcome.rs index 6df354219e..7d1723f56e 100644 --- a/crates/evm/execution-types/src/execution_outcome.rs +++ b/crates/evm/execution-types/src/execution_outcome.rs @@ -249,6 +249,14 @@ impl ExecutionOutcome { &self.receipts[index] } + /// Returns an iterator over receipt slices, one per block. + /// + /// This is a more ergonomic alternative to `receipts()` that yields slices + /// instead of requiring indexing into a nested `Vec>`. + pub fn receipts_iter(&self) -> impl Iterator + '_ { + self.receipts.iter().map(|v| v.as_slice()) + } + /// Is execution outcome empty. pub const fn is_empty(&self) -> bool { self.len() == 0