From c2517a0432149ffdc205c7d6c8c19d70b466d99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Mon, 11 Jun 2018 14:25:47 +0200 Subject: [PATCH] Shell: minor renaming --- src/lib_client_base/client_confirmations.ml | 2 +- src/lib_shell/block_directory.ml | 12 ++++++------ src/lib_shell_services/block_services.ml | 16 ++++++++-------- src/lib_shell_services/block_services.mli | 8 ++++---- src/proto_alpha/lib_client/injection.ml | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/lib_client_base/client_confirmations.ml b/src/lib_client_base/client_confirmations.ml index a936c3a7b..b2c6cfedf 100644 --- a/src/lib_client_base/client_confirmations.ml +++ b/src/lib_client_base/client_confirmations.ml @@ -61,7 +61,7 @@ let wait_for_operation_inclusion end else return (Some block_with_op) | None -> - Shell_services.Blocks.Operation_hash.operation_hashes + Shell_services.Blocks.Operation_hashes.operation_hashes ctxt ~chain ~block () >>=? fun operations -> let in_block = let exception Found of int * int in diff --git a/src/lib_shell/block_directory.ml b/src/lib_shell/block_directory.ml index 8ed37f33f..acf1f122a 100644 --- a/src/lib_shell/block_directory.ml +++ b/src/lib_shell/block_directory.ml @@ -135,18 +135,18 @@ let build_raw_rpc_directory let chain_id = State.Block.chain_id block in return (List.map2 (List.map2 (convert chain_id)) ops metadata) in - register0 S.Operation.operations begin fun block () () -> + register0 S.Operations.operations begin fun block () () -> operations block end ; - register1 S.Operation.operations_in_pass begin fun block i () () -> + register1 S.Operations.operations_in_pass begin fun block i () () -> State.Block.operations block i >>= fun (ops, _path) -> State.Block.operations_metadata block i >>= fun metadata -> let chain_id = State.Block.chain_id block in return (List.map2 (convert chain_id) ops metadata) end ; - register2 S.Operation.operation begin fun block i j () () -> + register2 S.Operations.operation begin fun block i j () () -> State.Block.operations block i >>= fun (ops, _path) -> State.Block.operations_metadata block i >>= fun metadata -> let chain_id = State.Block.chain_id block in @@ -155,16 +155,16 @@ let build_raw_rpc_directory (* operation_hashes *) - register0 S.Operation_hash.operation_hashes begin fun block () () -> + register0 S.Operation_hashes.operation_hashes begin fun block () () -> State.Block.all_operation_hashes block >>= return end ; - register1 S.Operation_hash.operation_hashes_in_pass begin fun block i () () -> + register1 S.Operation_hashes.operation_hashes_in_pass begin fun block i () () -> State.Block.operation_hashes block i >>= fun (ops, _) -> return ops end ; - register2 S.Operation_hash.operation_hash begin fun block i j () () -> + register2 S.Operation_hashes.operation_hash begin fun block i j () () -> State.Block.operation_hashes block i >>= fun (ops, _) -> return (List.nth ops j) end ; diff --git a/src/lib_shell_services/block_services.ml b/src/lib_shell_services/block_services.ml index 852521903..8c5c9e5a0 100644 --- a/src/lib_shell_services/block_services.ml +++ b/src/lib_shell_services/block_services.ml @@ -391,7 +391,7 @@ module Make(Proto : PROTO)(Next_proto : PROTO) = struct end - module Operation = struct + module Operations = struct let path = RPC_path.(path / "operations") @@ -440,7 +440,7 @@ module Make(Proto : PROTO)(Next_proto : PROTO) = struct end - module Operation_hash = struct + module Operation_hashes = struct let path = RPC_path.(path / "operation_hashes") @@ -457,7 +457,7 @@ module Make(Proto : PROTO)(Next_proto : PROTO) = struct "All the operations included in `n-th` validation pass of the block." ~query: RPC_query.empty ~output: (list Operation_hash.encoding) - RPC_path.(path /: Operation.list_arg) + RPC_path.(path /: Operations.list_arg) let operation_hash = RPC_service.get_service @@ -465,7 +465,7 @@ module Make(Proto : PROTO)(Next_proto : PROTO) = struct "The hash of then `m-th` operation in the `n-th` validation pass of the block." ~query: RPC_query.empty ~output: Operation_hash.encoding - RPC_path.(path /: Operation.list_arg /: Operation.offset_arg) + RPC_path.(path /: Operations.list_arg /: Operations.offset_arg) end module Helpers = struct @@ -659,9 +659,9 @@ module Make(Proto : PROTO)(Next_proto : PROTO) = struct end - module Operation = struct + module Operations = struct - module S = S.Operation + module S = S.Operations let operations ctxt = let f = make_call0 S.operations ctxt in @@ -680,9 +680,9 @@ module Make(Proto : PROTO)(Next_proto : PROTO) = struct end - module Operation_hash = struct + module Operation_hashes = struct - module S = S.Operation_hash + module S = S.Operation_hashes let operation_hashes ctxt = let f = make_call0 S.operation_hashes ctxt in diff --git a/src/lib_shell_services/block_services.mli b/src/lib_shell_services/block_services.mli index 73b6db2aa..695eea39b 100644 --- a/src/lib_shell_services/block_services.mli +++ b/src/lib_shell_services/block_services.mli @@ -145,7 +145,7 @@ module Make(Proto : PROTO)(Next_proto : PROTO) : sig end - module Operation : sig + module Operations : sig val operations: #simple -> ?chain:chain -> ?block:block -> @@ -159,7 +159,7 @@ module Make(Proto : PROTO)(Next_proto : PROTO) : sig end - module Operation_hash : sig + module Operation_hashes : sig val operation_hashes: #simple -> ?chain:chain -> ?block:block -> @@ -264,7 +264,7 @@ module Make(Proto : PROTO)(Next_proto : PROTO) : sig end - module Operation : sig + module Operations : sig val operations: ([ `GET ], prefix, @@ -283,7 +283,7 @@ module Make(Proto : PROTO)(Next_proto : PROTO) : sig end - module Operation_hash : sig + module Operation_hashes : sig val operation_hashes: ([ `GET ], prefix, diff --git a/src/proto_alpha/lib_client/injection.ml b/src/proto_alpha/lib_client/injection.ml index db8069d07..2132d6afc 100644 --- a/src/proto_alpha/lib_client/injection.ml +++ b/src/proto_alpha/lib_client/injection.ml @@ -322,7 +322,7 @@ let inject_operation cctxt#message "Waiting for the operation to be included..." >>= fun () -> Client_confirmations.wait_for_operation_inclusion ~confirmations cctxt ~chain oph >>=? fun (h, i , j) -> - Alpha_block_services.Operation.operation + Alpha_block_services.Operations.operation cctxt ~block:(`Hash (h, 0)) i j >>=? fun op' -> match op'.receipt with | No_operation_metadata ->