Skip to content

Commit

Permalink
Fix deadlock on block cache. (#6412)
Browse files Browse the repository at this point in the history
* Fix deadlock on block cache.
  • Loading branch information
jimmygchen authored Sep 19, 2024
1 parent 8a085fc commit 46e0d66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions beacon_node/beacon_chain/src/eth1_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,10 @@ impl<E: EthSpec> Eth1ChainBackend<E> for CachingEth1Backend<E> {
voting_period_start_slot,
);

let blocks = self.core.blocks().read();

let votes_to_consider =
get_votes_to_consider(blocks.iter(), voting_period_start_seconds, spec);
let votes_to_consider = {
let blocks = self.core.blocks().read();
get_votes_to_consider(blocks.iter(), voting_period_start_seconds, spec)
};

trace!(
self.log,
Expand Down

0 comments on commit 46e0d66

Please sign in to comment.