Only increment total_deposit_count for 32 ETH deposits from PoW chain

This commit is contained in:
vbuterin 2018-11-24 14:03:22 -05:00 committed by GitHub
parent 91848b87eb
commit fe3a0d6881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -587,7 +587,8 @@ def deposit(deposit_params: bytes[2048]):
for i in range(POW_CONTRACT_MERKLE_TREE_DEPTH):
index //= 2
self.receipt_tree[index] = sha3(concat(self.receipt_tree[index * 2], self.receipt_tree[index * 2 + 1]))
self.total_deposit_count += 1
if msg.value == MIN_DEPOSIT_SIZE:
self.total_deposit_count += 1
if self.total_deposit_count == 16384:
log.ChainStart(self.receipt_tree[1], timestamp_bytes8)