Skip to content

Commit

Permalink
chore(provider): clone after filtering on sealed_headers_while (#11459
Browse files Browse the repository at this point in the history
)

      Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
  • Loading branch information
joshieDo authored Oct 3, 2024
1 parent 7d092a2 commit af46562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/storage/provider/src/providers/blockchain_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ impl<N: ProviderNodeTypes> HeaderProvider for BlockchainProvider2<N> {
range,
|db_provider, range, predicate| db_provider.sealed_headers_while(range, predicate),
|block_state, predicate| {
Some(block_state.block_ref().block().header.clone())
.filter(|header| predicate(header))
let header = &block_state.block_ref().block().header;
predicate(header).then(|| header.clone())
},
predicate,
)
Expand Down

0 comments on commit af46562

Please sign in to comment.