2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2017-11-14 03:36:14 +04:00
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
2016-09-08 21:13:10 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2016-12-03 16:05:02 +04:00
|
|
|
let call_service1 cctxt s block a1 =
|
2017-04-05 01:35:41 +04:00
|
|
|
Client_rpcs.call_service1 cctxt
|
2016-09-08 21:13:10 +04:00
|
|
|
(s Node_rpc_services.Blocks.proto_path) block a1
|
2016-12-03 16:05:02 +04:00
|
|
|
let call_error_service1 cctxt s block a1 =
|
2017-04-05 01:35:41 +04:00
|
|
|
call_service1 cctxt s block a1 >>= function
|
2017-10-27 20:53:07 +04:00
|
|
|
| Ok (Error _ as err) -> Lwt.return (Environment.wrap_error err)
|
2017-04-05 01:35:41 +04:00
|
|
|
| Ok (Ok v) -> return v
|
|
|
|
| Error _ as err -> Lwt.return err
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2016-12-03 16:05:02 +04:00
|
|
|
let echo cctxt = call_service1 cctxt Services.echo_service
|
|
|
|
let failing cctxt = call_error_service1 cctxt Services.failing_service
|