From 867af4bc6ad5efcaeba3d6891031c2bcb3997a8c Mon Sep 17 00:00:00 2001 From: Luke Anderson Date: Thu, 28 Mar 2019 21:00:38 +1100 Subject: [PATCH] Made the 'signers' an Arc, so that things compile. --- validator_client/src/duties/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validator_client/src/duties/mod.rs b/validator_client/src/duties/mod.rs index 9d9221592..0b86e3ce9 100644 --- a/validator_client/src/duties/mod.rs +++ b/validator_client/src/duties/mod.rs @@ -42,7 +42,7 @@ pub struct DutiesManager { pub duties_map: RwLock, /// A list of all signer objects known to the validator service. // TODO: Generalise the signers, so that they're not just keypairs - pub signers: Vec, + pub signers: Arc>, pub beacon_node: Arc, } @@ -97,7 +97,7 @@ impl DutiesManager { // if the map is poisoned, return None let duties = self.duties_map.read().ok()?; - for validator_signer in &self.signers { + for validator_signer in self.signers.iter() { match duties.is_work_slot(slot, &validator_signer) { Ok(Some(work_type)) => current_work.push((validator_signer.clone(), work_type)), Ok(None) => {} // No work for this validator