Client: avoid unrequired monitor

This commit is contained in:
Grégoire Henry 2017-03-09 14:35:43 +01:00
parent 556c965af7
commit 82628a6ca2

View File

@ -28,6 +28,7 @@ let run cctxt ?max_priority ~delay ?min_date delegates =
Lwt.return_unit Lwt.return_unit
in in
let forge = let forge =
if Client_proto_args.Daemon.(!all || !mining) then begin
Client_mining_blocks.monitor Client_mining_blocks.monitor
cctxt ?min_date ~min_heads:1 () >>= fun block_stream -> cctxt ?min_date ~min_heads:1 () >>= fun block_stream ->
(* Temporary desactivate the monitoring of endorsement: (* Temporary desactivate the monitoring of endorsement:
@ -35,10 +36,9 @@ let run cctxt ?max_priority ~delay ?min_date delegates =
(* Client_mining_operations.monitor_endorsement *) (* Client_mining_operations.monitor_endorsement *)
(* cctxt >>= fun endorsement_stream -> *) (* cctxt >>= fun endorsement_stream -> *)
let endorsement_stream, _push = Lwt_stream.create () in let endorsement_stream, _push = Lwt_stream.create () in
if Client_proto_args.Daemon.(!all || !mining) then
Client_mining_forge.create cctxt Client_mining_forge.create cctxt
?max_priority delegates block_stream endorsement_stream ?max_priority delegates block_stream endorsement_stream
else end else
Lwt.return_unit Lwt.return_unit
in in
denunciation >>= fun () -> denunciation >>= fun () ->