Permalink
Browse files

don't double-count non-unique suicides

  • Loading branch information...
1 parent 79ab136 commit 7c1520774d7786811077c0e0a9b7d84bbb5fde3f @vbuterin vbuterin committed Aug 11, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 ethereum/processblock.py
@@ -156,7 +156,7 @@ def apply_transaction(block, tx):
else:
log_tx.debug('TX SUCCESS', data=data)
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:
log_tx.debug('Refunding', gas_refunded=min(block.refunds, gas_used // 2))
gas_remained += min(block.refunds, gas_used // 2)

0 comments on commit 7c15207

Please sign in to comment.