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

Commit 7c15207

Browse files
committed
don't double-count non-unique suicides
1 parent 79ab136 commit 7c15207

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethereum/processblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def apply_transaction(block, tx):
156156
else:
157157
log_tx.debug('TX SUCCESS', data=data)
158158
gas_used = tx.startgas - gas_remained
159-
block.refunds += len(block.suicides) * opcodes.GSUICIDEREFUND
159+
block.refunds += len(set(block.suicides)) * opcodes.GSUICIDEREFUND
160160
if block.refunds > 0:
161161
log_tx.debug('Refunding', gas_refunded=min(block.refunds, gas_used // 2))
162162
gas_remained += min(block.refunds, gas_used // 2)

0 commit comments

Comments
 (0)