Shell: minor fix in RPC description
This commit is contained in:
parent
5266671c72
commit
c87e88d84d
@ -555,25 +555,23 @@ let inject_operation =
|
|||||||
RPCs ubder /blocks/prevalidation for more details on the \
|
RPCs ubder /blocks/prevalidation for more details on the \
|
||||||
prevalidation context."
|
prevalidation context."
|
||||||
~input:
|
~input:
|
||||||
(conv
|
(obj3
|
||||||
(fun (block, blocking, force) -> (block, Some blocking, force))
|
(req "signedOperationContents"
|
||||||
(fun (block, blocking, force) -> (block, unopt ~default:true blocking, force))
|
(describe ~title: "Tezos signed operation (hex encoded)"
|
||||||
(obj3
|
bytes))
|
||||||
(req "signedOperationContents"
|
(dft "blocking"
|
||||||
(describe ~title: "Tezos signed operation (hex encoded)"
|
(describe
|
||||||
bytes))
|
~description:
|
||||||
(opt "blocking"
|
"Should the RPC wait for the operation to be \
|
||||||
(describe
|
(pre-)validated before to answer. (default: true)"
|
||||||
~description:
|
bool)
|
||||||
"Should the RPC wait for the operation to be \
|
true)
|
||||||
(pre-)validated before to answer. (default: true)"
|
(opt "force"
|
||||||
bool))
|
(describe
|
||||||
(opt "force"
|
~description:
|
||||||
(describe
|
"Should we inject operation that are \"branch_refused\" \
|
||||||
~description:
|
or \"branch_delayed\". (default: false)"
|
||||||
"Should we inject operation that are \"branch_refused\" \
|
bool)))
|
||||||
or \"branch_delayed\". (default: false)"
|
|
||||||
bool))))
|
|
||||||
~output:
|
~output:
|
||||||
(Error.wrap @@
|
(Error.wrap @@
|
||||||
describe
|
describe
|
||||||
@ -582,21 +580,6 @@ let inject_operation =
|
|||||||
RPC.Path.(root / "inject_operation")
|
RPC.Path.(root / "inject_operation")
|
||||||
|
|
||||||
let inject_protocol =
|
let inject_protocol =
|
||||||
let proto =
|
|
||||||
(list
|
|
||||||
(obj3
|
|
||||||
(req "name"
|
|
||||||
(describe ~title:"OCaml module name"
|
|
||||||
string))
|
|
||||||
(opt "interface"
|
|
||||||
(describe
|
|
||||||
~description:"Content of the .mli file"
|
|
||||||
string))
|
|
||||||
(req "implementation"
|
|
||||||
(describe
|
|
||||||
~description:"Content of the .ml file"
|
|
||||||
string))))
|
|
||||||
in
|
|
||||||
let proto_of_rpc =
|
let proto_of_rpc =
|
||||||
List.map (fun (name, interface, implementation) ->
|
List.map (fun (name, interface, implementation) ->
|
||||||
{ Tezos_compiler.Protocol.name; interface; implementation })
|
{ Tezos_compiler.Protocol.name; interface; implementation })
|
||||||
@ -605,28 +588,44 @@ let inject_protocol =
|
|||||||
List.map (fun { Tezos_compiler.Protocol.name; interface; implementation } ->
|
List.map (fun { Tezos_compiler.Protocol.name; interface; implementation } ->
|
||||||
(name, interface, implementation))
|
(name, interface, implementation))
|
||||||
in
|
in
|
||||||
|
let proto =
|
||||||
|
conv
|
||||||
|
rpc_of_proto
|
||||||
|
proto_of_rpc
|
||||||
|
(list
|
||||||
|
(obj3
|
||||||
|
(req "name"
|
||||||
|
(describe ~title:"OCaml module name"
|
||||||
|
string))
|
||||||
|
(opt "interface"
|
||||||
|
(describe
|
||||||
|
~description:"Content of the .mli file"
|
||||||
|
string))
|
||||||
|
(req "implementation"
|
||||||
|
(describe
|
||||||
|
~description:"Content of the .ml file"
|
||||||
|
string))))
|
||||||
|
in
|
||||||
RPC.service
|
RPC.service
|
||||||
~description:
|
~description:
|
||||||
"Inject a protocol in node. Returns the ID of the protocol."
|
"Inject a protocol in node. Returns the ID of the protocol."
|
||||||
~input:
|
~input:
|
||||||
(conv
|
(obj3
|
||||||
(fun (proto, blocking, force) -> (rpc_of_proto proto, Some blocking, force))
|
(req "protocol"
|
||||||
(fun (proto, blocking, force) -> (proto_of_rpc proto, unopt ~default:true blocking, force))
|
(describe ~title: "Tezos protocol"
|
||||||
(obj3
|
proto))
|
||||||
(req "protocol"
|
(dft "blocking"
|
||||||
(describe ~title: "Tezos protocol"
|
(describe
|
||||||
proto))
|
~description:
|
||||||
(opt "blocking"
|
"Should the RPC wait for the protocol to be \
|
||||||
(describe
|
validated before to answer. (default: true)"
|
||||||
~description:
|
bool)
|
||||||
"Should the RPC wait for the protocol to be \
|
true)
|
||||||
validated before to answer. (default: true)"
|
(opt "force"
|
||||||
bool))
|
(describe
|
||||||
(opt "force"
|
~description:
|
||||||
(describe
|
"Should we inject protocol that is invalid. (default: false)"
|
||||||
~description:
|
bool)))
|
||||||
"Should we inject protocol that is invalid. (default: false)"
|
|
||||||
bool))))
|
|
||||||
~output:
|
~output:
|
||||||
(Error.wrap @@
|
(Error.wrap @@
|
||||||
describe
|
describe
|
||||||
|
Loading…
Reference in New Issue
Block a user