mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
More variable-variable lists
This commit is contained in:
@@ -111,9 +111,12 @@ impl<T: BeaconChainTypes> ValidatorPubkeyCache<T> {
|
||||
state: &BeaconState<T::EthSpec>,
|
||||
) -> Result<(), BeaconChainError> {
|
||||
if state.validators().len() > self.pubkeys.len() {
|
||||
// FIXME(sproul): iter_from would be more efficient than `skip` here
|
||||
self.import(
|
||||
state.validators()[self.pubkeys.len()..]
|
||||
state
|
||||
.validators()
|
||||
.iter()
|
||||
.skip(self.pubkeys.len())
|
||||
.map(|v| v.pubkey),
|
||||
)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user