diff --git a/src/lib_shell/bootstrap_pipeline.ml b/src/lib_shell/bootstrap_pipeline.ml index 323f8b3d5..021e8f44e 100644 --- a/src/lib_shell/bootstrap_pipeline.ml +++ b/src/lib_shell/bootstrap_pipeline.ml @@ -35,7 +35,7 @@ let assert_acceptable_header pipeline ?(first = false) hash (header : Block_header.t) = let chain_state = Distributed_db.chain_state pipeline.chain_db in fail_unless - (Time.(now () >= header.shell.timestamp)) + (Time.(add (now ()) 15L >= header.shell.timestamp)) (Future_block_header hash) >>=? fun () -> State.Chain.checkpoint chain_state >>= fun (level, checkpoint) -> fail_when diff --git a/src/lib_shell/distributed_db.ml b/src/lib_shell/distributed_db.ml index d77eea659..eff7551ec 100644 --- a/src/lib_shell/distributed_db.ml +++ b/src/lib_shell/distributed_db.ml @@ -494,7 +494,7 @@ module P2p_reader = struct (* TODO Kick *) P2p.greylist_peer global_db.p2p state.gid ; Lwt.return_unit - end else if Time.(now () < head.shell.timestamp) then begin + end else if Time.(add (now ()) 15L < head.shell.timestamp) then begin (* TODO some penalty *) lwt_log_notice "Received future block %a from peer %a." Block_hash.pp_short (Block_header.hash head) @@ -545,7 +545,7 @@ module P2p_reader = struct (* TODO Kick *) P2p.greylist_peer global_db.p2p state.gid ; Lwt.return_unit - end else if Time.(now () < header.shell.timestamp) then begin + end else if Time.(add (now ()) 15L < header.shell.timestamp) then begin (* TODO some penalty *) lwt_log_notice "Received future block %a from peer %a." Block_hash.pp_short head