Client/Baker: fix baking of the first block.

This commit is contained in:
Benjamin Canou 2017-02-10 18:20:35 +01:00 committed by Grégoire Henry
parent 34e1764bce
commit f77a2544cc

View File

@ -13,7 +13,7 @@ let run cctxt ?max_priority ~delay ?min_date delegates =
(* TODO really detach... *)
let endorsement =
if Client_proto_args.Daemon.(!all || !endorsement) then
Client_mining_blocks.monitor cctxt ?min_date () >>= fun block_stream ->
Client_mining_blocks.monitor cctxt ?min_date ~min_heads:1 () >>= fun block_stream ->
Client_mining_endorsement.create cctxt ~delay delegates block_stream
else
Lwt.return_unit
@ -26,7 +26,7 @@ let run cctxt ?max_priority ~delay ?min_date delegates =
Lwt.return_unit
in
let forge =
Client_mining_blocks.monitor cctxt ?min_date () >>= fun block_stream ->
Client_mining_blocks.monitor cctxt ?min_date ~min_heads:1 () >>= fun block_stream ->
Client_mining_operations.monitor_endorsement cctxt >>= fun endorsement_stream ->
if Client_proto_args.Daemon.(!all || !mining) then
Client_mining_forge.create cctxt