@@ -832,6 +832,11 @@ func (b *BlockChainAPI) FeeHistory(
832832 blockRewards := make ([]* hexutil.Big , len (rewardPercentiles ))
833833 feeParams , err := b .feeParameters .Get ()
834834 if err != nil {
835+ b .logger .Warn ().
836+ Uint64 ("height" , blockHeight ).
837+ Err (err ).
838+ Msg ("failed to get fee parameters for block in fee history" )
839+
835840 continue
836841 }
837842 gasPrice := feeParams .CalculateGasPrice (b .config .GasPrice )
@@ -1021,9 +1026,9 @@ func (b *BlockChainAPI) Coinbase(ctx context.Context) (common.Address, error) {
10211026func (b * BlockChainAPI ) GasPrice (ctx context.Context ) (* hexutil.Big , error ) {
10221027 feeParams , err := b .feeParameters .Get ()
10231028 if err != nil {
1024- return nil , err
1029+ b .logger .Warn ().Err (err ).Msg ("fee parameters unavailable; falling back to base gas price" )
1030+ return (* hexutil .Big )(b .config .GasPrice ), nil
10251031 }
1026-
10271032 gasPrice := feeParams .CalculateGasPrice (b .config .GasPrice )
10281033 return (* hexutil .Big )(gasPrice ), nil
10291034}
@@ -1068,9 +1073,9 @@ func (b *BlockChainAPI) GetUncleByBlockNumberAndIndex(
10681073func (b * BlockChainAPI ) MaxPriorityFeePerGas (ctx context.Context ) (* hexutil.Big , error ) {
10691074 feeParams , err := b .feeParameters .Get ()
10701075 if err != nil {
1071- return nil , err
1076+ b .logger .Warn ().Err (err ).Msg ("fee parameters unavailable; falling back to base gas price" )
1077+ return (* hexutil .Big )(b .config .GasPrice ), nil
10721078 }
1073-
10741079 gasPrice := feeParams .CalculateGasPrice (b .config .GasPrice )
10751080 return (* hexutil .Big )(gasPrice ), nil
10761081}
0 commit comments