Replace numeric constant with symbolic in Vyper contract
Vyper v0.1.0-beta.6 supports ranges with symbolic constants.
This commit is contained in:
parent
9dfc459849
commit
61f7e37eff
|
@ -675,7 +675,7 @@ def deposit(deposit_input: bytes[2048]):
|
||||||
|
|
||||||
# add deposit to merkle tree
|
# add deposit to merkle tree
|
||||||
self.deposit_tree[index] = sha3(deposit_data)
|
self.deposit_tree[index] = sha3(deposit_data)
|
||||||
for i in range(32): # DEPOSIT_CONTRACT_TREE_DEPTH (range of constant var not yet supported)
|
for i in range(DEPOSIT_CONTRACT_TREE_DEPTH):
|
||||||
index /= 2
|
index /= 2
|
||||||
self.deposit_tree[index] = sha3(concat(self.deposit_tree[index * 2], self.deposit_tree[index * 2 + 1]))
|
self.deposit_tree[index] = sha3(concat(self.deposit_tree[index * 2], self.deposit_tree[index * 2 + 1]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue