update mgval by side effect

This commit is contained in:
zhiqiangxu 2024-02-24 12:17:50 +08:00
parent 93c541ad56
commit d203a3f1e6

View file

@ -234,7 +234,7 @@ func (st *StateTransition) to() common.Address {
func (st *StateTransition) buyGas() error {
mgval := new(big.Int).SetUint64(st.msg.GasLimit)
mgval = mgval.Mul(mgval, st.msg.GasPrice)
mgval.Mul(mgval, st.msg.GasPrice)
balanceCheck := new(big.Int).Set(mgval)
if st.msg.GasFeeCap != nil {
balanceCheck.SetUint64(st.msg.GasLimit)