P2p: /network/identity -> /network/self
This commit is contained in:
parent
9d1bf10b94
commit
70afae4a81
@ -579,7 +579,7 @@ let build_rpc_directory net =
|
|||||||
end in
|
end in
|
||||||
|
|
||||||
let dir =
|
let dir =
|
||||||
RPC_directory.register0 dir P2p_services.S.identity begin fun () () ->
|
RPC_directory.register0 dir P2p_services.S.self begin fun () () ->
|
||||||
match net.pool with
|
match net.pool with
|
||||||
| None -> failwith "The P2P layer is disabled."
|
| None -> failwith "The P2P layer is disabled."
|
||||||
| Some pool -> return (P2p_pool.config pool).identity.peer_id
|
| Some pool -> return (P2p_pool.config pool).identity.peer_id
|
||||||
|
@ -49,12 +49,12 @@ let timeout_query =
|
|||||||
|
|
||||||
module S = struct
|
module S = struct
|
||||||
|
|
||||||
let identity =
|
let self =
|
||||||
RPC_service.get_service
|
RPC_service.get_service
|
||||||
~description:"Return the node's identity"
|
~description:"Return the node's peer id"
|
||||||
~query: RPC_query.empty
|
~query: RPC_query.empty
|
||||||
~output: P2p_peer.Id.encoding
|
~output: P2p_peer.Id.encoding
|
||||||
RPC_path.(root / "network" / "identity")
|
RPC_path.(root / "network" / "self")
|
||||||
|
|
||||||
let versions =
|
let versions =
|
||||||
RPC_service.get_service
|
RPC_service.get_service
|
||||||
@ -88,7 +88,7 @@ module S = struct
|
|||||||
end
|
end
|
||||||
|
|
||||||
open RPC_context
|
open RPC_context
|
||||||
let identity ctxt = make_call S.identity ctxt () () ()
|
let self ctxt = make_call S.self ctxt () () ()
|
||||||
let stat ctxt = make_call S.stat ctxt () () ()
|
let stat ctxt = make_call S.stat ctxt () () ()
|
||||||
let versions ctxt = make_call S.versions ctxt () () ()
|
let versions ctxt = make_call S.versions ctxt () () ()
|
||||||
let events ctxt = make_streamed_call S.events ctxt () () ()
|
let events ctxt = make_streamed_call S.events ctxt () () ()
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
open RPC_context
|
open RPC_context
|
||||||
|
|
||||||
val identity: #simple -> P2p_peer.Id.t tzresult Lwt.t
|
val self: #simple -> P2p_peer.Id.t tzresult Lwt.t
|
||||||
|
|
||||||
val stat: #simple -> P2p_stat.t tzresult Lwt.t
|
val stat: #simple -> P2p_stat.t tzresult Lwt.t
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ val connect: #simple -> timeout:float -> P2p_point.Id.t -> unit tzresult Lwt.t
|
|||||||
|
|
||||||
module S : sig
|
module S : sig
|
||||||
|
|
||||||
val identity :
|
val self :
|
||||||
([ `GET ], unit,
|
([ `GET ], unit,
|
||||||
unit, unit, unit,
|
unit, unit, unit,
|
||||||
P2p_peer.Id.t) RPC_service.t
|
P2p_peer.Id.t) RPC_service.t
|
||||||
|
Loading…
Reference in New Issue
Block a user