From cfe4b2bf5681ff0a7a487046d6d698df1eed1f77 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 12 May 2023 23:41:15 -0700 Subject: [PATCH] fix consensus head bug iterated on the vec --- web3_proxy/src/rpcs/consensus.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web3_proxy/src/rpcs/consensus.rs b/web3_proxy/src/rpcs/consensus.rs index a352c7f9..8ab756ff 100644 --- a/web3_proxy/src/rpcs/consensus.rs +++ b/web3_proxy/src/rpcs/consensus.rs @@ -252,7 +252,7 @@ impl ConsensusFinder { // loop over all the rpc heads (grouped by tier) and their parents to find consensus // TODO: i'm sure theres a lot of shortcuts that could be taken, but this is simplest to implement - for (rpc, rpc_head) in self.rpc_heads.iter() { + for (rpc, rpc_head) in rpc_heads_by_tier.into_iter() { if current_tier != rpc.tier { // we finished processing a tier. check for primary results if let Some(consensus) = self.count_votes(&primary_votes, web3_rpcs) {