Skip to content

Commit d962a06

Browse files
gzliudanjsvisa
andauthored
eth/tracers: fix a bug in prestateTracer ethereum#25884 (#1297)
Co-authored-by: Delweng <delweng@gmail.com>
1 parent de4fa1d commit d962a06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)