From df81d95614fe91eb22c89de6048b8f5de8a2f3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Sat, 14 Jan 2017 13:12:55 +0100 Subject: [PATCH] Shell: update to `lwt.2.7.0` --- .../bootstrap/mining/client_mining_forge.ml | 2 +- .../mining/client_mining_operations.ml | 19 +++++++++++-------- .../webclient_proto_service_directory.ml | 2 +- src/tezos-deps.opam | 13 +++++++------ 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/client/embedded/bootstrap/mining/client_mining_forge.ml b/src/client/embedded/bootstrap/mining/client_mining_forge.ml index 68a621970..3ea587027 100644 --- a/src/client/embedded/bootstrap/mining/client_mining_forge.ml +++ b/src/client/embedded/bootstrap/mining/client_mining_forge.ml @@ -198,7 +198,7 @@ end = struct let lock = Lwt_mutex.create () - let get_block cctxt level = + let get_block _cctxt level = Lwt_mutex.with_lock lock (fun () -> load () >>=? fun map -> diff --git a/src/client/embedded/bootstrap/mining/client_mining_operations.ml b/src/client/embedded/bootstrap/mining/client_mining_operations.ml index e6841e7db..2e3d16ff3 100644 --- a/src/client/embedded/bootstrap/mining/client_mining_operations.ml +++ b/src/client/embedded/bootstrap/mining/client_mining_operations.ml @@ -93,12 +93,15 @@ let filter_valid_endorsement cctxt { hash; content } = let monitor_endorsement cctxt = monitor cctxt ~contents:true ~check:true () >>= fun ops_stream -> let endorsement_stream, push = Lwt_stream.create () in - Lwt_stream.on_termination ops_stream (fun () -> push None) ; - Lwt.async (fun () -> - Lwt_stream.iter_p - (Lwt_list.iter_p (fun e -> - filter_valid_endorsement cctxt e >>= function - | None -> Lwt.return_unit - | Some e -> push (Some e) ; Lwt.return_unit)) - ops_stream) ; + Lwt.async begin fun () -> + Lwt_stream.closed ops_stream >|= fun () -> push None + end; + Lwt.async begin fun () -> + Lwt_stream.iter_p + (Lwt_list.iter_p (fun e -> + filter_valid_endorsement cctxt e >>= function + | None -> Lwt.return_unit + | Some e -> push (Some e) ; Lwt.return_unit)) + ops_stream + end ; Lwt.return endorsement_stream diff --git a/src/client/embedded/bootstrap/webclient/webclient_proto_service_directory.ml b/src/client/embedded/bootstrap/webclient/webclient_proto_service_directory.ml index 71023c1ec..5dd2f12c9 100644 --- a/src/client/embedded/bootstrap/webclient/webclient_proto_service_directory.ml +++ b/src/client/embedded/bootstrap/webclient/webclient_proto_service_directory.ml @@ -15,7 +15,7 @@ let cctxt = Client_commands.ignore_context let root = let root = - RPC.register RPC.empty Services.contracts @@ fun block () -> + RPC.register RPC.empty Services.contracts @@ fun _block () -> Client_proto_contracts.RawContractAlias.load cctxt >>= fun list -> let (names, _) = List.split list in RPC.Answer.return names in diff --git a/src/tezos-deps.opam b/src/tezos-deps.opam index f864c5279..0637af7dc 100644 --- a/src/tezos-deps.opam +++ b/src/tezos-deps.opam @@ -18,21 +18,22 @@ depends: [ "calendar" "cohttp" {>= "0.21" } "config-file" - "conduit" {= "0.14.0" } # Version 0.14.1 doas not compile with `ssl` (17/01/02) + "conduit" "git" "git-unix" "irmin-watcher" (* for `irmin.unix` *) - "irmin" {>= "0.12"} + "irmin" {>= "0.12" } + "lwt" {>= "2.7.0" } + "lwt_ssl" "menhir" - "ocp-ocamlres" {>= "dev"} + "ocp-ocamlres" {>= "dev" } "ocplib-endian" "ocplib-json-typed" - "ocplib-resto" {>= "dev"} + "ocplib-resto" {>= "dev" } "reactiveData" "tyxml" "js_of_ocaml" - "sodium" {>= "0.3.0"} - "ssl" + "sodium" {>= "0.3.0" } "kaputt" # { test } "bisect_ppx" # { test } ]