forked from cerc-io/laconicd-deprecated
rpc: add NoBaseFee check in backend.BaseFee (#697)
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze Küllmer
parent
5ff2a2c45f
commit
08a8191002
@@ -807,6 +807,16 @@ func (e *EVMBackend) BaseFee(height int64) (*big.Int, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Checks the feemarket param NoBaseFee settings, return 0 if it is enabled.
|
||||
resParams, err := e.queryClient.FeeMarket.Params(e.ctx, &feemarkettypes.QueryParamsRequest{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if resParams.Params.NoBaseFee {
|
||||
return big.NewInt(0), nil
|
||||
}
|
||||
|
||||
blockRes, err := e.clientCtx.Client.BlockResults(e.ctx, &height)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user