mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 22:06:21 +00:00
cleanup Electra fork references (#6372)
Adjust two fork references to match surrounding code style.
This commit is contained in:
parent
61610fd243
commit
22b5bc6256
@ -1155,7 +1155,7 @@ func get_next_sync_committee_keys(
|
|||||||
random_byte = eth2digest(hash_buffer).data[i mod 32]
|
random_byte = eth2digest(hash_buffer).data[i mod 32]
|
||||||
effective_balance = state.validators[candidate_index].effective_balance
|
effective_balance = state.validators[candidate_index].effective_balance
|
||||||
const meb =
|
const meb =
|
||||||
when typeof(state).kind >= Electra:
|
when typeof(state).kind >= ConsensusFork.Electra:
|
||||||
MAX_EFFECTIVE_BALANCE_ELECTRA.Gwei # [Modified in Electra:EIP7251]
|
MAX_EFFECTIVE_BALANCE_ELECTRA.Gwei # [Modified in Electra:EIP7251]
|
||||||
else:
|
else:
|
||||||
MAX_EFFECTIVE_BALANCE.Gwei
|
MAX_EFFECTIVE_BALANCE.Gwei
|
||||||
@ -1262,7 +1262,7 @@ func switch_to_compounding_validator*(
|
|||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#new-get_pending_balance_to_withdraw
|
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#new-get_pending_balance_to_withdraw
|
||||||
func get_pending_balance_to_withdraw*(
|
func get_pending_balance_to_withdraw*(
|
||||||
state: Electra.BeaconState, validator_index: ValidatorIndex): Gwei =
|
state: electra.BeaconState, validator_index: ValidatorIndex): Gwei =
|
||||||
var pending_balance: Gwei
|
var pending_balance: Gwei
|
||||||
for withdrawal in state.pending_partial_withdrawals:
|
for withdrawal in state.pending_partial_withdrawals:
|
||||||
if withdrawal.index == validator_index:
|
if withdrawal.index == validator_index:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user