From 93a72ca28db3e9ba40f344833bf8ab7b5754c0bc Mon Sep 17 00:00:00 2001 From: Benjamin Canou Date: Mon, 18 Jun 2018 18:50:32 +0200 Subject: [PATCH] Baker: avoid infinite sleep to the past --- src/proto_alpha/lib_delegate/client_baking_forge.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_delegate/client_baking_forge.ml b/src/proto_alpha/lib_delegate/client_baking_forge.ml index 2bb213ffc..738900c01 100644 --- a/src/proto_alpha/lib_delegate/client_baking_forge.ml +++ b/src/proto_alpha/lib_delegate/client_baking_forge.ml @@ -406,8 +406,10 @@ let compute_timeout { future_slots } = Lwt_utils.never_ending | (timestamp, _) :: _ -> match Client_baking_scheduling.sleep_until timestamp with - | None -> Lwt_utils.never_ending - | Some timeout -> timeout + | None -> + Lwt.return () + | Some timeout -> + timeout let get_unrevealed_nonces (cctxt : #Proto_alpha.full) ?(force = false) ?(chain = `Main) block =