Merge pull request #619 from terenc3t/patch-49

Quick fix for lmd_ghost
This commit is contained in:
Hsiao-Wei Wang 2019-02-14 00:43:20 +08:00 committed by GitHub
commit 327c282d76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1587,7 +1587,7 @@ def lmd_ghost(store: Store, start_state: BeaconState, start_block: BeaconBlock)
Execute the LMD-GHOST algorithm to find the head ``BeaconBlock``. Execute the LMD-GHOST algorithm to find the head ``BeaconBlock``.
""" """
validators = start_state.validator_registry validators = start_state.validator_registry
active_validator_indices = get_active_validator_indices(validators, start_state.slot) active_validator_indices = get_active_validator_indices(validators, slot_to_epoch(start_state.slot))
attestation_targets = [ attestation_targets = [
(validator_index, get_latest_attestation_target(store, validator_index)) (validator_index, get_latest_attestation_target(store, validator_index))
for validator_index in active_validator_indices for validator_index in active_validator_indices