From 8618cbdf38ded50c4c0e5dd741124d17e125fcfe Mon Sep 17 00:00:00 2001 From: Dustin Brody Date: Tue, 4 Aug 2020 20:52:37 +0200 Subject: [PATCH] keep representations consistent for tests --- beacon_chain/spec/beaconstate.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_chain/spec/beaconstate.nim b/beacon_chain/spec/beaconstate.nim index 21d88ca6e..35388cf3d 100644 --- a/beacon_chain/spec/beaconstate.nim +++ b/beacon_chain/spec/beaconstate.nim @@ -50,7 +50,7 @@ func decrease_balance*( state.balances[index] - delta # https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/beacon-chain.md#deposits -proc get_validator_from_deposit(state: BeaconState, deposit: Deposit): +func get_validator_from_deposit(state: BeaconState, deposit: Deposit): Validator = let amount = deposit.data.amount @@ -58,7 +58,7 @@ proc get_validator_from_deposit(state: BeaconState, deposit: Deposit): amount - amount mod EFFECTIVE_BALANCE_INCREMENT, MAX_EFFECTIVE_BALANCE) Validator( - pubkey: deposit.data.pubkey.initPubKey, + pubkey: deposit.data.pubkey, withdrawal_credentials: deposit.data.withdrawal_credentials, activation_eligibility_epoch: FAR_FUTURE_EPOCH, activation_epoch: FAR_FUTURE_EPOCH,