Skip to content

Commit

Permalink
Revert "core/txpool/blobpool: fix a merge conflict from a package ren…
Browse files Browse the repository at this point in the history
…ame (ethereum#27790)"

This reverts commit c3b5e6a.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent 5841bb3 commit 98ef0a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions core/txpool/blobpool/blobpool.go
Expand Up @@ -30,7 +30,6 @@ 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"
Expand Down Expand Up @@ -403,7 +402,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(eip4844.CalcBlobFee(*p.head.ExcessDataGas))
blobfee = uint256.MustFromBig(misc.CalcBlobFee(*p.head.ExcessDataGas))
}
p.evict = newPriceHeap(basefee, blobfee, &p.index)

Expand Down Expand Up @@ -776,7 +775,7 @@ func (p *BlobPool) Reset(oldHead, newHead *types.Header) {
blobfee = uint256.MustFromBig(big.NewInt(params.BlobTxMinDataGasprice))
)
if newHead.ExcessDataGas != nil {
blobfee = uint256.MustFromBig(eip4844.CalcBlobFee(*newHead.ExcessDataGas))
blobfee = uint256.MustFromBig(misc.CalcBlobFee(*newHead.ExcessDataGas))
}
p.evict.reinit(basefee, blobfee, false)

Expand Down
3 changes: 1 addition & 2 deletions core/txpool/blobpool/blobpool_test.go
Expand Up @@ -31,7 +31,6 @@ 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"
Expand Down Expand Up @@ -131,7 +130,7 @@ func (bc *testBlockChain) CurrentBlock() *types.Header {
mid := new(big.Int).Add(lo, hi)
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
} else {
lo = mid
Expand Down

0 comments on commit 98ef0a5

Please sign in to comment.