mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-26 01:05:15 +00:00
Simplify deposits
This commit is contained in:
parent
b0a3b436e3
commit
d805fb5084
@ -471,8 +471,6 @@ The types are defined topologically to aid in facilitating an executable version
|
|||||||
{
|
{
|
||||||
# Branch in the deposit tree
|
# Branch in the deposit tree
|
||||||
'proof': ['bytes32', DEPOSIT_CONTRACT_TREE_DEPTH],
|
'proof': ['bytes32', DEPOSIT_CONTRACT_TREE_DEPTH],
|
||||||
# Index in the deposit tree
|
|
||||||
'index': 'uint64',
|
|
||||||
# Data
|
# Data
|
||||||
'data': DepositData,
|
'data': DepositData,
|
||||||
}
|
}
|
||||||
@ -1763,12 +1761,11 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None:
|
|||||||
leaf=hash_tree_root(deposit.data),
|
leaf=hash_tree_root(deposit.data),
|
||||||
proof=deposit.proof,
|
proof=deposit.proof,
|
||||||
depth=DEPOSIT_CONTRACT_TREE_DEPTH,
|
depth=DEPOSIT_CONTRACT_TREE_DEPTH,
|
||||||
index=deposit.index,
|
index=state.deposit_index,
|
||||||
root=state.latest_eth1_data.deposit_root,
|
root=state.latest_eth1_data.deposit_root,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Deposits must be processed in order
|
# Deposits must be processed in order
|
||||||
assert deposit.index == state.deposit_index
|
|
||||||
state.deposit_index += 1
|
state.deposit_index += 1
|
||||||
|
|
||||||
pubkey = deposit.data.pubkey
|
pubkey = deposit.data.pubkey
|
||||||
|
Loading…
x
Reference in New Issue
Block a user