Mempool.Config
Mempool filter configuration.
type t = {
minimal_fees : int option;
minimal_nanomav_per_gas_unit : (int * int) option;
minimal_nanomav_per_byte : (int * int) option;
replace_by_fee_factor : (int * int) option;
max_operations : int option;
max_total_bytes : int option;
}
Representation of the mempool configuration. None
means that the field has been or will be omitted in the json encoding, in which case they are equal to the default values given below.
val to_string : t -> string
Build the Ezjsonm representation then encode it as a string.
val of_json : Tezt_wrapper.JSON.t -> t
Return the config corresponding to the given json. If any field is missing, it is set to None
.
Default value for the minimal_fees
field (see src/proto_alpha/lib_plugin/plugin.ml)
Default value for the minimal_nanomav_per_gas_unit
field (see src/proto_alpha/lib_plugin/plugin.ml)
Default value for the minimal_nanomav_per_byte
field (see src/proto_alpha/lib_plugin/plugin.ml)
Default value for the replace_by_fee_factor
field (see src/proto_alpha/lib_plugin/plugin.ml)
Default value for the max_operations
field (see src/lib_shell/prevalidator_bounding.ml)
Default value for the max_total_bytes
field (see src/lib_shell/prevalidator_bounding.ml)
val default : t
Configuration where each field is explicitely set to its default value.
Returns a copy of the given filter config, where missing fields (i.e. containing None
) have been set to their default value.
val call_get_filter :
?endpoint:Client.endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
?include_default:bool ->
Client.t ->
Tezt_wrapper.JSON.t Lwt.t
Call the RPC GET /chains/main/mempool/filter
with query parameter include_default
.
val check_get_filter_all_variations :
?log:bool ->
?endpoint:Client.endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
t ->
Client.t ->
unit Lwt.t
Check that the RPC GET /chains/main/mempool/filter
returns the json corresponding to the provided t
, testing all possibilities for the optional argument include_default
(omitted/true
/false
).
val post_filter :
?log:bool ->
?endpoint:Client.endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
t ->
Client.t ->
Tezt_wrapper.JSON.t Lwt.t
Call the RPC POST /chains/main/mempool/filter
with data set to the json representation of the given config t
.
val post_filter_str :
?log:bool ->
?endpoint:Client.endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
string ->
Client.t ->
Tezt_wrapper.JSON.t Lwt.t
Same as post_filter
but takes the data config as a string.
val set_filter :
?log:bool ->
?endpoint:Client.endpoint ->
?hooks:Tezt_wrapper.Process.hooks ->
?minimal_fees:int ->
?minimal_nanomav_per_gas_unit:(int * int) ->
?minimal_nanomav_per_byte:(int * int) ->
?replace_by_fee_factor:(int * int) ->
?max_operations:int ->
?max_total_bytes:int ->
Client.t ->
unit Lwt.t
Set the mempool filter config to the provided parameters. Note that every omitted parameter will be set back to its default value, even if it previously held a different value.
More precisely, call post_filter
on the config corresponding to the arguments named after config fields. Then, check that the config returned by the RPC is the same as the input one (where each omitted field has been filled with its default value).