Simplify deposits

This commit is contained in:
Justin 2019-05-25 00:35:17 +03:00 committed by GitHub
parent b0a3b436e3
commit d805fb5084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -471,8 +471,6 @@ The types are defined topologically to aid in facilitating an executable version
{
# Branch in the deposit tree
'proof': ['bytes32', DEPOSIT_CONTRACT_TREE_DEPTH],
# Index in the deposit tree
'index': 'uint64',
# Data
'data': DepositData,
}
@ -1763,12 +1761,11 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None:
leaf=hash_tree_root(deposit.data),
proof=deposit.proof,
depth=DEPOSIT_CONTRACT_TREE_DEPTH,
index=deposit.index,
index=state.deposit_index,
root=state.latest_eth1_data.deposit_root,
)
# Deposits must be processed in order
assert deposit.index == state.deposit_index
state.deposit_index += 1
pubkey = deposit.data.pubkey