This commit is contained in:
cui 2026-05-22 13:02:33 +08:00 committed by GitHub
commit 0a69d4ae88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -432,8 +432,10 @@ func (b *EthAPIBackend) FeeHistory(ctx context.Context, blockCount uint64, lastB
}
func (b *EthAPIBackend) BaseFee(ctx context.Context) *big.Int {
if b.ChainConfig().IsLondon(b.CurrentHeader().Number) {
return eip1559.CalcBaseFee(b.ChainConfig(), b.CurrentHeader())
header := b.CurrentHeader()
next := new(big.Int).Add(header.Number, common.Big1)
if b.ChainConfig().IsLondon(next) {
return eip1559.CalcBaseFee(b.ChainConfig(), header)
}
return nil
}