Fix deadlock on block cache. (#6412)

* Fix deadlock on block cache.
This commit is contained in:
Jimmy Chen
2024-09-19 14:58:43 +10:00
committed by GitHub
parent 8a085fc828
commit 46e0d66e2d

View File

@@ -475,10 +475,10 @@ impl<E: EthSpec> Eth1ChainBackend<E> for CachingEth1Backend<E> {
voting_period_start_slot, voting_period_start_slot,
); );
let blocks = self.core.blocks().read(); let votes_to_consider = {
let blocks = self.core.blocks().read();
let votes_to_consider = get_votes_to_consider(blocks.iter(), voting_period_start_seconds, spec)
get_votes_to_consider(blocks.iter(), voting_period_start_seconds, spec); };
trace!( trace!(
self.log, self.log,