From 101bf81c70d2a4445d54237d343f2abbc6a8c61b Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Mon, 7 Oct 2024 16:49:16 -0700 Subject: [PATCH] remove potential deadlock --- beacon_node/eth1/src/service.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beacon_node/eth1/src/service.rs b/beacon_node/eth1/src/service.rs index a70a927307d..71ab98a6a20 100644 --- a/beacon_node/eth1/src/service.rs +++ b/beacon_node/eth1/src/service.rs @@ -549,10 +549,11 @@ impl Service { /// Returns the number of deposits with valid signatures that have been observed. pub fn get_valid_signature_count(&self) -> Option { + let highest_safe_block = self.highest_safe_block()?; self.deposits() .read() .cache - .get_valid_signature_count(self.highest_safe_block()?) + .get_valid_signature_count(highest_safe_block) } /// Returns the number of deposits with valid signatures that have been observed, without