Shell: update to lwt.2.7.0

This commit is contained in:
Grégoire Henry 2017-01-14 13:12:55 +01:00
parent 7689021810
commit df81d95614
4 changed files with 20 additions and 16 deletions

View File

@ -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 ->

View File

@ -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.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) ;
ops_stream
end ;
Lwt.return endorsement_stream

View File

@ -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

View File

@ -18,11 +18,13 @@ 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" }
"lwt" {>= "2.7.0" }
"lwt_ssl"
"menhir"
"ocp-ocamlres" {>= "dev" }
"ocplib-endian"
@ -32,7 +34,6 @@ depends: [
"tyxml"
"js_of_ocaml"
"sodium" {>= "0.3.0" }
"ssl"
"kaputt" # { test }
"bisect_ppx" # { test }
]