From 51fd7215e31a2305818c868eda12232158b9f9e1 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 19 Sep 2024 08:25:03 +1000 Subject: [PATCH] Fix deadlock on block cache. --- beacon_node/beacon_chain/src/eth1_chain.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beacon_node/beacon_chain/src/eth1_chain.rs b/beacon_node/beacon_chain/src/eth1_chain.rs index 9e1bcbe6fa8..2252d5b9c92 100644 --- a/beacon_node/beacon_chain/src/eth1_chain.rs +++ b/beacon_node/beacon_chain/src/eth1_chain.rs @@ -475,10 +475,10 @@ impl Eth1ChainBackend for CachingEth1Backend { 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,