Revert "core/txpool/blobpool: fix a merge conflict from a package rename (#27790)"

This reverts commit c3b5e6ad26.
This commit is contained in:
devopsbo3 2023-11-10 12:27:53 -06:00 committed by GitHub
parent 12e039eb6d
commit 0d0ee8dd68
2 changed files with 3 additions and 5 deletions

View file

@ -30,7 +30,6 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/misc" "github.com/ethereum/go-ethereum/consensus/misc"
"github.com/ethereum/go-ethereum/consensus/misc/eip4844"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/txpool" "github.com/ethereum/go-ethereum/core/txpool"
@ -403,7 +402,7 @@ func (p *BlobPool) Init(gasTip *big.Int, head *types.Header, reserve txpool.Addr
blobfee = uint256.MustFromBig(big.NewInt(params.BlobTxMinDataGasprice)) blobfee = uint256.MustFromBig(big.NewInt(params.BlobTxMinDataGasprice))
) )
if p.head.ExcessDataGas != nil { if p.head.ExcessDataGas != nil {
blobfee = uint256.MustFromBig(eip4844.CalcBlobFee(*p.head.ExcessDataGas)) blobfee = uint256.MustFromBig(misc.CalcBlobFee(*p.head.ExcessDataGas))
} }
p.evict = newPriceHeap(basefee, blobfee, &p.index) p.evict = newPriceHeap(basefee, blobfee, &p.index)
@ -776,7 +775,7 @@ func (p *BlobPool) Reset(oldHead, newHead *types.Header) {
blobfee = uint256.MustFromBig(big.NewInt(params.BlobTxMinDataGasprice)) blobfee = uint256.MustFromBig(big.NewInt(params.BlobTxMinDataGasprice))
) )
if newHead.ExcessDataGas != nil { if newHead.ExcessDataGas != nil {
blobfee = uint256.MustFromBig(eip4844.CalcBlobFee(*newHead.ExcessDataGas)) blobfee = uint256.MustFromBig(misc.CalcBlobFee(*newHead.ExcessDataGas))
} }
p.evict.reinit(basefee, blobfee, false) p.evict.reinit(basefee, blobfee, false)

View file

@ -31,7 +31,6 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/misc" "github.com/ethereum/go-ethereum/consensus/misc"
"github.com/ethereum/go-ethereum/consensus/misc/eip4844"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/state"
@ -131,7 +130,7 @@ func (bc *testBlockChain) CurrentBlock() *types.Header {
mid := new(big.Int).Add(lo, hi) mid := new(big.Int).Add(lo, hi)
mid.Div(mid, big.NewInt(2)) mid.Div(mid, big.NewInt(2))
if eip4844.CalcBlobFee(mid.Uint64()).Cmp(bc.blobfee.ToBig()) > 0 { if misc.CalcBlobFee(mid.Uint64()).Cmp(bc.blobfee.ToBig()) > 0 {
hi = mid hi = mid
} else { } else {
lo = mid lo = mid