mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-06 06:58:39 +00:00
Merge ca153d40bf into 12eabbd76d
This commit is contained in:
commit
0a69d4ae88
1 changed files with 4 additions and 2 deletions
|
|
@ -432,8 +432,10 @@ func (b *EthAPIBackend) FeeHistory(ctx context.Context, blockCount uint64, lastB
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *EthAPIBackend) BaseFee(ctx context.Context) *big.Int {
|
func (b *EthAPIBackend) BaseFee(ctx context.Context) *big.Int {
|
||||||
if b.ChainConfig().IsLondon(b.CurrentHeader().Number) {
|
header := b.CurrentHeader()
|
||||||
return eip1559.CalcBaseFee(b.ChainConfig(), b.CurrentHeader())
|
next := new(big.Int).Add(header.Number, common.Big1)
|
||||||
|
if b.ChainConfig().IsLondon(next) {
|
||||||
|
return eip1559.CalcBaseFee(b.ChainConfig(), header)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue