Verified Commit 5e674326 authored by Mathias Bourgoin's avatar Mathias Bourgoin Committed by Raphaël Proust

Doc: expose Node validator

parent 66e21cb4
Pipeline #61555278 failed with stages
in 5 minutes and 10 seconds
......@@ -52,7 +52,7 @@ let with_node f =
Node.default_block_validator_limits
Node.default_mempool_validator_limits
Node.default_chain_validator_limits >>=? fun node ->
f node >>=? fun () ->
f node (Node.validator node) >>=? fun () ->
return () in
Lwt_utils_unix.with_tempdir "tezos_rpcdoc_" run >>= function
| Ok () ->
......
......@@ -27,7 +27,7 @@ let protocols = [
"Alpha", "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK" ;
]
let main _node =
let main _node _validator =
(* Style : hack *)
Format.printf "%a@." Rst.pp_raw_html Rst.style ;
(* Script : hack *)
......
......@@ -288,7 +288,7 @@ let pp_document ppf descriptions =
Format.fprintf ppf "%a@\n@\n" (Description.pp prefix) rpc_dir)
descriptions
let main node =
let main node validator =
let shell_dir = Node.build_rpc_directory node in
let protocol_dirs =
List.map
......@@ -298,7 +298,7 @@ let main node =
"Protocol " ^ name,
[".." ; "<block_id>"] ,
RPC_directory.map (fun () -> assert false) @@
Block_directory.build_raw_rpc_directory (module Proto) (module Proto))
Block_directory.build_raw_rpc_directory validator (module Proto) (module Proto))
protocols in
let dirs = ("Shell", [""], shell_dir) :: protocol_dirs in
Lwt_list.map_p
......
......@@ -319,6 +319,8 @@ let create
let shutdown node = node.shutdown ()
let validator node = node.validator
let build_rpc_directory node =
let dir : unit RPC_directory.t ref = ref RPC_directory.empty in
let merge d = dir := RPC_directory.merge !dir d in
......
......@@ -79,4 +79,6 @@ val create:
val shutdown: t -> unit Lwt.t
val validator: t -> Validator.t
val build_rpc_directory: t -> unit RPC_directory.t
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment