Baker: use next_protocols when calling GET /monitor/heads

This commit is contained in:
Grégoire Henry 2018-07-18 20:21:23 +02:00
parent f9dd92d6b4
commit 86091e98c6
3 changed files with 4 additions and 2 deletions

View File

@ -69,7 +69,7 @@ let monitor_valid_blocks cctxt ?chains ?protocols ?next_protocols () =
raw_info cctxt ~chain:(`Hash chain) block shell) raw_info cctxt ~chain:(`Hash chain) block shell)
block_stream) block_stream)
let monitor_heads cctxt ?next_protocols chain = let monitor_heads cctxt ~next_protocols chain =
Monitor_services.heads Monitor_services.heads
cctxt ?next_protocols chain >>=? fun (block_stream, _stop) -> cctxt ?next_protocols chain >>=? fun (block_stream, _stop) ->
return (Lwt_stream.map_s return (Lwt_stream.map_s

View File

@ -54,7 +54,7 @@ val monitor_valid_blocks:
val monitor_heads: val monitor_heads:
#Proto_alpha.rpc_context -> #Proto_alpha.rpc_context ->
?next_protocols:Protocol_hash.t list -> next_protocols:Protocol_hash.t list option ->
Chain_services.chain -> Chain_services.chain ->
block_info tzresult Lwt_stream.t tzresult Lwt.t block_info tzresult Lwt_stream.t tzresult Lwt.t

View File

@ -27,6 +27,7 @@ module Endorser = struct
let run (cctxt : #Proto_alpha.full) ~delay ?min_date delegates = let run (cctxt : #Proto_alpha.full) ~delay ?min_date delegates =
Client_baking_blocks.monitor_heads Client_baking_blocks.monitor_heads
~next_protocols:(Some [Proto_alpha.hash])
cctxt `Main >>=? fun block_stream -> cctxt `Main >>=? fun block_stream ->
Client_baking_endorsement.create cctxt ~delay delegates block_stream >>=? fun () -> Client_baking_endorsement.create cctxt ~delay delegates block_stream >>=? fun () ->
ignore min_date; ignore min_date;
@ -38,6 +39,7 @@ module Baker = struct
let run (cctxt : #Proto_alpha.full) ?threshold ?max_priority ?min_date ~context_path delegates = let run (cctxt : #Proto_alpha.full) ?threshold ?max_priority ?min_date ~context_path delegates =
Client_baking_blocks.monitor_heads Client_baking_blocks.monitor_heads
~next_protocols:(Some [Proto_alpha.hash])
cctxt `Main >>=? fun block_stream -> cctxt `Main >>=? fun block_stream ->
Client_baking_forge.create cctxt Client_baking_forge.create cctxt
?threshold ?max_priority ~context_path delegates block_stream >>=? fun () -> ?threshold ?max_priority ~context_path delegates block_stream >>=? fun () ->