Made the 'signers' an Arc, so that things compile.
This commit is contained in:
parent
ba71e8adca
commit
867af4bc6a
@ -42,7 +42,7 @@ pub struct DutiesManager<U: BeaconNode> {
|
|||||||
pub duties_map: RwLock<EpochDutiesMap>,
|
pub duties_map: RwLock<EpochDutiesMap>,
|
||||||
/// A list of all signer objects known to the validator service.
|
/// A list of all signer objects known to the validator service.
|
||||||
// TODO: Generalise the signers, so that they're not just keypairs
|
// TODO: Generalise the signers, so that they're not just keypairs
|
||||||
pub signers: Vec<Keypair>,
|
pub signers: Arc<Vec<Keypair>>,
|
||||||
pub beacon_node: Arc<U>,
|
pub beacon_node: Arc<U>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ impl<U: BeaconNode> DutiesManager<U> {
|
|||||||
// if the map is poisoned, return None
|
// if the map is poisoned, return None
|
||||||
let duties = self.duties_map.read().ok()?;
|
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) {
|
match duties.is_work_slot(slot, &validator_signer) {
|
||||||
Ok(Some(work_type)) => current_work.push((validator_signer.clone(), work_type)),
|
Ok(Some(work_type)) => current_work.push((validator_signer.clone(), work_type)),
|
||||||
Ok(None) => {} // No work for this validator
|
Ok(None) => {} // No work for this validator
|
||||||
|
Loading…
Reference in New Issue
Block a user