Unverified Commit 85aafcfb authored by Delweng's avatar Delweng Committed by GitHub

eth/tracers: fix a bug in prestateTracer (#25884)

parent 2b1299b1
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment