core: initialize gasRemaining with = instead of += (#29149)

initialize gasRemaining with = instead of +=
This commit is contained in:
zhiqiangxu 2024-03-05 16:47:58 +08:00 committed by GitHub
parent 9b3ceb2137
commit d89d7ebdec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -263,7 +263,7 @@ func (st *StateTransition) buyGas() error {
if err := st.gp.SubGas(st.msg.GasLimit); err != nil { if err := st.gp.SubGas(st.msg.GasLimit); err != nil {
return err return err
} }
st.gasRemaining += st.msg.GasLimit st.gasRemaining = st.msg.GasLimit
st.initialGas = st.msg.GasLimit st.initialGas = st.msg.GasLimit
mgvalU256, _ := uint256.FromBig(mgval) mgvalU256, _ := uint256.FromBig(mgval)