mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core\state_transition.go: fix typos
This commit is contained in:
parent
c66ca8bf7a
commit
7eb707962e
1 changed files with 5 additions and 5 deletions
|
|
@ -232,9 +232,9 @@ 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)
|
||||
balanceCheck := new(big.Int).Set(mgval)
|
||||
mgVal := new(big.Int).SetUint64(st.msg.GasLimit)
|
||||
mgVal = mgVal.Mul(mgVal, st.msg.GasPrice)
|
||||
balanceCheck := new(big.Int).Set(mgVal)
|
||||
if st.msg.GasFeeCap != nil {
|
||||
balanceCheck.SetUint64(st.msg.GasLimit)
|
||||
balanceCheck = balanceCheck.Mul(balanceCheck, st.msg.GasFeeCap)
|
||||
|
|
@ -249,7 +249,7 @@ func (st *StateTransition) buyGas() error {
|
|||
// Pay for blobGasUsed * actual blob fee
|
||||
blobFee := new(big.Int).SetUint64(blobGas)
|
||||
blobFee.Mul(blobFee, st.evm.Context.BlobBaseFee)
|
||||
mgval.Add(mgval, blobFee)
|
||||
mgVal.Add(mgVal, blobFee)
|
||||
}
|
||||
}
|
||||
if have, want := st.state.GetBalance(st.msg.From), balanceCheck; have.Cmp(want) < 0 {
|
||||
|
|
@ -261,7 +261,7 @@ func (st *StateTransition) buyGas() error {
|
|||
st.gasRemaining += st.msg.GasLimit
|
||||
|
||||
st.initialGas = st.msg.GasLimit
|
||||
st.state.SubBalance(st.msg.From, mgval)
|
||||
st.state.SubBalance(st.msg.From, mgVal)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue