From 0f4b21feacbb0666d6014da3d1da1ba45b47d1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 27 Jul 2023 14:53:05 +0300 Subject: [PATCH] core/txpool/blobpool: fix a merge conflict from a package rename (#27790) --- core/txpool/blobpool/blobpool.go | 5 +++-- core/txpool/blobpool/blobpool_test.go | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index baf5e54667e36..3f34e3925f565 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -30,6 +30,7 @@ import ( "github.com/ethereum/go-ethereum/common" "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/state" "github.com/ethereum/go-ethereum/core/txpool" @@ -402,7 +403,7 @@ func (p *BlobPool) Init(gasTip *big.Int, head *types.Header, reserve txpool.Addr blobfee = uint256.MustFromBig(big.NewInt(params.BlobTxMinDataGasprice)) ) if p.head.ExcessDataGas != nil { - blobfee = uint256.MustFromBig(misc.CalcBlobFee(*p.head.ExcessDataGas)) + blobfee = uint256.MustFromBig(eip4844.CalcBlobFee(*p.head.ExcessDataGas)) } p.evict = newPriceHeap(basefee, blobfee, &p.index) @@ -775,7 +776,7 @@ func (p *BlobPool) Reset(oldHead, newHead *types.Header) { blobfee = uint256.MustFromBig(big.NewInt(params.BlobTxMinDataGasprice)) ) if newHead.ExcessDataGas != nil { - blobfee = uint256.MustFromBig(misc.CalcBlobFee(*newHead.ExcessDataGas)) + blobfee = uint256.MustFromBig(eip4844.CalcBlobFee(*newHead.ExcessDataGas)) } p.evict.reinit(basefee, blobfee, false) diff --git a/core/txpool/blobpool/blobpool_test.go b/core/txpool/blobpool/blobpool_test.go index a657dd339080e..d1980b0423516 100644 --- a/core/txpool/blobpool/blobpool_test.go +++ b/core/txpool/blobpool/blobpool_test.go @@ -31,6 +31,7 @@ import ( "github.com/ethereum/go-ethereum/common" "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/rawdb" "github.com/ethereum/go-ethereum/core/state" @@ -130,7 +131,7 @@ func (bc *testBlockChain) CurrentBlock() *types.Header { mid := new(big.Int).Add(lo, hi) mid.Div(mid, big.NewInt(2)) - if misc.CalcBlobFee(mid.Uint64()).Cmp(bc.blobfee.ToBig()) > 0 { + if eip4844.CalcBlobFee(mid.Uint64()).Cmp(bc.blobfee.ToBig()) > 0 { hi = mid } else { lo = mid