From 6f91e3d3118a309d423ebf1bff3844bcf1be8605 Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Thu, 31 Oct 2024 12:46:36 +0100 Subject: [PATCH] fix(sidecar): find delegatees logic --- bolt-sidecar/src/client/constraints_client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bolt-sidecar/src/client/constraints_client.rs b/bolt-sidecar/src/client/constraints_client.rs index 47c4f926c..fda91fa3f 100644 --- a/bolt-sidecar/src/client/constraints_client.rs +++ b/bolt-sidecar/src/client/constraints_client.rs @@ -51,11 +51,11 @@ impl ConstraintsClient { self.delegations.extend(delegations); } - /// Finds all delegations for the given public key. - pub fn find_delegatees(&self, pubkey: &BlsPublicKey) -> HashSet { + /// Finds all delegations for the given validator public key. + pub fn find_delegatees(&self, validator_pubkey: &BlsPublicKey) -> HashSet { self.delegations .iter() - .filter(|d| d.message.delegatee_pubkey == *pubkey) + .filter(|d| d.message.validator_pubkey == *validator_pubkey) .map(|d| d.message.delegatee_pubkey.clone()) .collect::>() }