Shell: minor renaming
This commit is contained in:
parent
7ad44a9af3
commit
c2517a0432
@ -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
|
||||
|
@ -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 ;
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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 ->
|
||||
|
Loading…
Reference in New Issue
Block a user