Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/txpool/blobpool: remove error log when finalized block is nil #27822

Merged
merged 2 commits into from Aug 1, 2023

Conversation

rjl493456442
Copy link
Member

No description provided.

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@karalabe
Copy link
Member

Wouldn't this be a better fix?

diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go
index 07e3e3ff9..aac770c49 100644
--- a/core/txpool/blobpool/blobpool.go
+++ b/core/txpool/blobpool/blobpool.go
@@ -768,8 +768,9 @@ func (p *BlobPool) Reset(oldHead, newHead *types.Header) {
                }
        }
        // Flush out any blobs from limbo that are older than the latest finality
-       p.limbo.finalize(p.chain.CurrentFinalBlock())
-
+       if p.chain.Config().IsCancun(p.head.Number, p.head.Time) {
+               p.limbo.finalize(p.chain.CurrentFinalBlock())
+       }
        // Reset the price heap for the new set of basefee/blobfee pairs
        var (
                basefee = uint256.MustFromBig(misc.CalcBaseFee(p.chain.Config(), newHead))

@rjl493456442
Copy link
Member Author

done

@karalabe karalabe added this to the 1.12.1 milestone Aug 1, 2023
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@karalabe karalabe merged commit 2fd77a6 into ethereum:master Aug 1, 2023
1 of 2 checks passed
MoonShiesty pushed a commit to MoonShiesty/go-ethereum that referenced this pull request Aug 30, 2023
…thereum#27822)

* core/txpool/blobpool: remove error log when finalized block is nil

* core/txpool/blobpool: take peter's suggestion
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
…thereum#27822)

* core/txpool/blobpool: remove error log when finalized block is nil

* core/txpool/blobpool: take peter's suggestion
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants