Skip to content

Commit

Permalink
eth/tracers: fix a bug in prestateTracer (#25884)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvisa authored Sep 28, 2022
1 parent 2b1299b commit 85aafcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/tracers/native/prestate.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (t *prestateTracer) CaptureStart(env *vm.EVM, from common.Address, to commo

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

0 comments on commit 85aafcf

Please sign in to comment.