Skip to content

Commit

Permalink
refactor(rpc): small refactor in trace_filter (#11894)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger authored Oct 19, 2024
1 parent 3793b90 commit ddc5ac3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions crates/rpc/rpc/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,15 @@ where
// add reward traces for all blocks
for block in &blocks {
if let Some(base_block_reward) = self.calculate_base_block_reward(&block.header)? {
let mut traces = self.extract_reward_traces(
&block.header,
&block.body.ommers,
base_block_reward,
all_traces.extend(
self.extract_reward_traces(
&block.header,
&block.body.ommers,
base_block_reward,
)
.into_iter()
.filter(|trace| matcher.matches(&trace.trace)),
);
traces.retain(|trace| matcher.matches(&trace.trace));
all_traces.extend(traces);
} else {
// no block reward, means we're past the Paris hardfork and don't expect any rewards
// because the blocks in ascending order
Expand Down

0 comments on commit ddc5ac3

Please sign in to comment.