mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
fix blob gas awards
This commit is contained in:
parent
ea8ada3431
commit
8cbb3beab7
2 changed files with 14 additions and 1 deletions
|
|
@ -27,6 +27,11 @@ import (
|
|||
"github.com/tenderly/binance-geth/rpc"
|
||||
)
|
||||
|
||||
// Binance: SystemAddress
|
||||
var (
|
||||
SystemAddress = common.HexToAddress("0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE")
|
||||
)
|
||||
|
||||
// ChainHeaderReader defines a small collection of methods needed to access the local
|
||||
// blockchain during header verification.
|
||||
type ChainHeaderReader interface {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import (
|
|||
|
||||
"github.com/tenderly/binance-geth/common"
|
||||
cmath "github.com/tenderly/binance-geth/common/math"
|
||||
"github.com/tenderly/binance-geth/consensus"
|
||||
"github.com/tenderly/binance-geth/core/types"
|
||||
"github.com/tenderly/binance-geth/core/vm"
|
||||
"github.com/tenderly/binance-geth/params"
|
||||
|
|
@ -440,7 +441,14 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
|||
} else {
|
||||
fee := new(big.Int).SetUint64(st.gasUsed())
|
||||
fee.Mul(fee, effectiveTip)
|
||||
st.state.AddBalance(st.evm.Context.Coinbase, fee)
|
||||
|
||||
st.state.AddBalance(consensus.SystemAddress, fee)
|
||||
// add extra blob fee reward
|
||||
if rules.IsCancun {
|
||||
blobFee := new(big.Int).SetUint64(st.blobGasUsed())
|
||||
blobFee.Mul(blobFee, st.evm.Context.BlobBaseFee)
|
||||
st.state.AddBalance(consensus.SystemAddress, blobFee)
|
||||
}
|
||||
}
|
||||
|
||||
return &ExecutionResult{
|
||||
|
|
|
|||
Loading…
Reference in a new issue