Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
don't double-count non-unique suicides
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuterin committed Aug 11, 2015
1 parent 79ab136 commit 7c15207
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ethereum/processblock.py
Expand Up @@ -156,7 +156,7 @@ def apply_transaction(block, tx):
else: else:
log_tx.debug('TX SUCCESS', data=data) log_tx.debug('TX SUCCESS', data=data)
gas_used = tx.startgas - gas_remained gas_used = tx.startgas - gas_remained
block.refunds += len(block.suicides) * opcodes.GSUICIDEREFUND block.refunds += len(set(block.suicides)) * opcodes.GSUICIDEREFUND
if block.refunds > 0: if block.refunds > 0:
log_tx.debug('Refunding', gas_refunded=min(block.refunds, gas_used // 2)) log_tx.debug('Refunding', gas_refunded=min(block.refunds, gas_used // 2))
gas_remained += min(block.refunds, gas_used // 2) gas_remained += min(block.refunds, gas_used // 2)
Expand Down

0 comments on commit 7c15207

Please sign in to comment.