Shell: add RPC to list network protocol versions.
This commit is contained in:
parent
16bae53015
commit
b5f0021016
@ -459,6 +459,10 @@ let build_rpc_directory node =
|
||||
let implementation () =
|
||||
Node.RPC.Network.stat node |> RPC.Answer.return in
|
||||
RPC.register0 dir Services.Network.stat implementation in
|
||||
let dir =
|
||||
let implementation () =
|
||||
RPC.Answer.return Distributed_db.Raw.supported_versions in
|
||||
RPC.register0 dir Services.Network.versions implementation in
|
||||
let dir =
|
||||
let implementation () =
|
||||
let stream, stopper = Node.RPC.Network.watch node in
|
||||
|
@ -509,6 +509,13 @@ module Network = struct
|
||||
~construct:Point.to_string
|
||||
()
|
||||
|
||||
let versions =
|
||||
RPC.service
|
||||
~description:"Supported network layer versions."
|
||||
~input: empty
|
||||
~output: (list P2p.Version.encoding)
|
||||
RPC.Path.(root / "network" / "versions")
|
||||
|
||||
let stat =
|
||||
RPC.service
|
||||
~description:"Global network bandwidth statistics in B/s."
|
||||
|
@ -124,6 +124,9 @@ module Network : sig
|
||||
val stat :
|
||||
(unit, unit, unit, P2p.Stat.t) RPC.service
|
||||
|
||||
val versions :
|
||||
(unit, unit, unit, P2p.Version.t list) RPC.service
|
||||
|
||||
val events :
|
||||
(unit, unit, unit, P2p.RPC.Event.t) RPC.service
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user