Replace numeric constant with symbolic in Vyper contract

Vyper v0.1.0-beta.6 supports ranges with symbolic constants.
This commit is contained in:
Ben Edgington 2019-01-08 19:41:40 +00:00
parent 9dfc459849
commit 61f7e37eff
1 changed files with 1 additions and 1 deletions

View File

@ -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]))