diff --git a/src/lib_shell/monitor_directory.ml b/src/lib_shell/monitor_directory.ml index 02640c591..7f8f9f4f8 100644 --- a/src/lib_shell/monitor_directory.ml +++ b/src/lib_shell/monitor_directory.ml @@ -125,7 +125,10 @@ let build_rpc_directory validator mainchain_validator = else Lwt.return_none) block_stream in - let first_call = ref true in + in_next_protocols head >>= fun first_block_is_among_next_protocols -> + let first_call = + (* Skip the first block if this is false *) + ref first_block_is_among_next_protocols in let next () = if !first_call then begin first_call := false ; Lwt.return_some (State.Block.hash head, State.Block.header head)