This commit syncs Prater

This commit is contained in:
Michael Sproul
2022-02-03 20:23:30 +11:00
parent 6c05b1de9b
commit f6230a5143
7 changed files with 30 additions and 15 deletions

View File

@@ -111,12 +111,11 @@ 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()
.iter()
.skip(self.pubkeys.len())
.iter_from(self.pubkeys.len())
.unwrap() // FIXME(sproul)
.map(|v| v.pubkey),
)
} else {