Skip to content

Commit 5e30910

Browse files
jsvisablakehhuynh
authored andcommitted
eth/tracers: fix a bug in prestateTracer (ethereum#25884)
1 parent 922a47a commit 5e30910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/tracers/native/prestate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (t *prestateTracer) CaptureStart(env *vm.EVM, from common.Address, to commo
7979

8080
// The sender balance is after reducing: value and gasLimit.
8181
// We need to re-add them to get the pre-tx balance.
82-
fromBal := t.prestate[from].Balance
82+
fromBal := new(big.Int).Set(t.prestate[from].Balance)
8383
gasPrice := env.TxContext.GasPrice
8484
consumedGas := new(big.Int).Mul(gasPrice, new(big.Int).SetUint64(t.gasLimit))
8585
fromBal.Add(fromBal, new(big.Int).Add(value, consumedGas))

0 commit comments

Comments
 (0)