mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-19 07:03:12 +00:00
Sync with ethereum/deposit_contract#43
This commit is contained in:
parent
2cd0dee661
commit
b280e0a8d4
File diff suppressed because one or more lines are too long
@ -88,12 +88,12 @@ def deposit(pubkey: bytes[PUBKEY_LENGTH],
|
|||||||
|
|
||||||
# add deposit to merkle tree
|
# add deposit to merkle tree
|
||||||
i: int128 = 0
|
i: int128 = 0
|
||||||
power_of_two: uint256 = 2
|
size: uint256 = index + 1
|
||||||
for _ in range(DEPOSIT_CONTRACT_TREE_DEPTH):
|
for _ in range(DEPOSIT_CONTRACT_TREE_DEPTH):
|
||||||
if (index+1) % power_of_two != 0:
|
if bitwise_and(size, 1) == 1:
|
||||||
break
|
break
|
||||||
i += 1
|
i += 1
|
||||||
power_of_two *= 2
|
size /= 2
|
||||||
|
|
||||||
zero_bytes_32: bytes32
|
zero_bytes_32: bytes32
|
||||||
pubkey_root: bytes32 = sha256(concat(pubkey, slice(zero_bytes_32, start=0, len=16)))
|
pubkey_root: bytes32 = sha256(concat(pubkey, slice(zero_bytes_32, start=0, len=16)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user