This commit is contained in:
Mikhail Kalinin 2024-05-16 16:55:23 +03:00 committed by GitHub
parent 74be5b2436
commit 222e980b7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -447,7 +447,7 @@ def compute_proposer_index(state: BeaconState, indices: Sequence[ValidatorIndex]
candidate_index = indices[compute_shuffled_index(i % total, total, seed)]
random_byte = hash(seed + uint_to_bytes(uint64(i // 32)))[i % 32]
effective_balance = state.validators[candidate_index].effective_balance
if effective_balance * MAX_RANDOM_BYTE >= MAX_EFFECTIVE_BALANCE_ELECTRA * random_byte: #[Modified in Electra:EIP7251]
if effective_balance * MAX_RANDOM_BYTE >= MAX_EFFECTIVE_BALANCE_ELECTRA * random_byte: # [Modified in Electra:EIP7251]
return candidate_index
i += 1
```