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

Header.BaseFee is set to non-zero for london fork disabled #1805

Merged
merged 2 commits into from
Aug 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions blockchain/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,14 @@ func (b *Blockchain) Close() error {

// CalculateBaseFee calculates the basefee of the header.
func (b *Blockchain) CalculateBaseFee(parent *types.Header) uint64 {
// Return zero base fee is a london hardfork is not enabled
if !b.config.Params.Forks.IsActive(chain.London, parent.Number) {
return 0
}

// Check if this is the first London hardfork block.
// Should return chain.GenesisBaseFee ins this case.
if parent.BaseFee == 0 {
begmaroman marked this conversation as resolved.
Show resolved Hide resolved
return chain.GenesisBaseFee
}

Expand Down
Loading