mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Arc-ify immutable Validator fields
This commit is contained in:
@@ -297,10 +297,10 @@ impl<T: EthSpec> ValidatorMonitor<T> {
|
||||
.skip(self.indices.len())
|
||||
.for_each(|(i, validator)| {
|
||||
let i = i as u64;
|
||||
if let Some(validator) = self.validators.get_mut(&validator.pubkey) {
|
||||
if let Some(validator) = self.validators.get_mut(validator.pubkey()) {
|
||||
validator.set_index(i)
|
||||
}
|
||||
self.indices.insert(i, validator.pubkey);
|
||||
self.indices.insert(i, *validator.pubkey());
|
||||
});
|
||||
|
||||
// Update metrics for individual validators.
|
||||
|
||||
@@ -116,7 +116,7 @@ impl<T: BeaconChainTypes> ValidatorPubkeyCache<T> {
|
||||
.validators()
|
||||
.iter_from(self.pubkeys.len())
|
||||
.unwrap() // FIXME(sproul)
|
||||
.map(|v| v.pubkey),
|
||||
.map(|v| *v.pubkey()),
|
||||
)
|
||||
} else {
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user