fix: query only header for fees

This commit is contained in:
Anthony Laibe 2024-01-22 11:12:50 +01:00 committed by Anthony Laibe
parent e65760ca85
commit 1017d2bc16
1 changed files with 2 additions and 2 deletions

View File

@ -107,13 +107,13 @@ func (f *FeeManager) suggestedFees(ctx context.Context, chainID uint64) (*Sugges
}, nil
}
block, err := backend.BlockByNumber(ctx, nil)
header, err := backend.HeaderByNumber(ctx, nil)
if err != nil {
return nil, err
}
config := params.MainnetChainConfig
baseFee := misc.CalcBaseFee(config, block.Header())
baseFee := misc.CalcBaseFee(config, header)
fees, err := f.getFeeHistorySorted(chainID)
if err != nil {