mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +00:00
Verify whether validators really are unknown during sync committee duty API request (#5174)
* Verify whether validators really are unknown during sync committee duty API request * Merge branch 'unstable' into fix-4717 * Merge branch 'unstable' into fix-4717 * Merge branch 'unstable' of https://github.com/sigp/lighthouse into fix-4717
This commit is contained in:
@@ -960,10 +960,10 @@ impl<T: EthSpec> BeaconState<T> {
|
||||
epoch: Epoch,
|
||||
validator_indices: &[u64],
|
||||
spec: &ChainSpec,
|
||||
) -> Result<Vec<Option<SyncDuty>>, Error> {
|
||||
) -> Result<Vec<Result<Option<SyncDuty>, Error>>, Error> {
|
||||
let sync_committee = self.get_built_sync_committee(epoch, spec)?;
|
||||
|
||||
validator_indices
|
||||
Ok(validator_indices
|
||||
.iter()
|
||||
.map(|&validator_index| {
|
||||
let pubkey = self.get_validator(validator_index as usize)?.pubkey;
|
||||
@@ -974,7 +974,7 @@ impl<T: EthSpec> BeaconState<T> {
|
||||
sync_committee,
|
||||
))
|
||||
})
|
||||
.collect()
|
||||
.collect())
|
||||
}
|
||||
|
||||
/// Get the canonical root of the `latest_block_header`, filling in its state root if necessary.
|
||||
|
||||
Reference in New Issue
Block a user