Make HW happy :)

This commit is contained in:
Justin Drake 2019-06-27 11:21:45 +01:00
parent a0c2f5c6b5
commit ee712ecdde
1 changed files with 6 additions and 7 deletions

View File

@ -1142,13 +1142,12 @@ def is_genesis_trigger(deposits: List[Deposit, 2**DEPOSIT_CONTRACT_TREE_DEPTH],
if time - time % SECONDS_PER_DAY + 2 * SECONDS_PER_DAY < MIN_GENESIS_TIME:
return False
# Initialize deposit root
state = BeaconState()
state.eth1_data.deposit_root = hash_tree_root(
Vector[DepositData, len(deposits)](list(map(lambda deposit: deposit.data, deposits)))
)
# Process deposits
for deposit in deposits:
state = BeaconState()
for i, deposit in enumerate(deposits):
state.eth1_data.deposit_root = hash_tree_root(
Vector[DepositData, len(deposits)](list(map(lambda deposit: deposit.data, deposits[:i])))
)
process_deposit(state, deposit)
# Count active validators at genesis