Accuser: ignore heads from protocols

This commit is contained in:
Grégoire Henry 2018-07-19 23:25:31 +02:00 committed by Benjamin Canou
parent 213bedaf58
commit 663127468d
3 changed files with 5 additions and 3 deletions

View File

@ -61,7 +61,7 @@ let info cctxt ?(chain = `Main) block =
cctxt ~chain ~block () >>=? fun shell_header -> cctxt ~chain ~block () >>=? fun shell_header ->
raw_info cctxt ~chain hash shell_header raw_info cctxt ~chain hash shell_header
let monitor_valid_blocks cctxt ?chains ?protocols ?next_protocols () = let monitor_valid_blocks cctxt ?chains ?protocols ~next_protocols () =
Monitor_services.valid_blocks cctxt Monitor_services.valid_blocks cctxt
?chains ?protocols ?next_protocols () >>=? fun (block_stream, _stop) -> ?chains ?protocols ?next_protocols () >>=? fun (block_stream, _stop) ->
return (Lwt_stream.map_s return (Lwt_stream.map_s

View File

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

View File

@ -51,7 +51,9 @@ end
module Accuser = struct module Accuser = struct
let run (cctxt : #Proto_alpha.full) ~preserved_levels = let run (cctxt : #Proto_alpha.full) ~preserved_levels =
Client_baking_blocks.monitor_valid_blocks cctxt ~chains:[ `Main ] () >>=? fun valid_blocks_stream -> Client_baking_blocks.monitor_valid_blocks
~next_protocols:(Some [Proto_alpha.hash])
cctxt ~chains:[ `Main ] () >>=? fun valid_blocks_stream ->
Client_baking_denunciation.create cctxt ~preserved_levels valid_blocks_stream >>=? fun () -> Client_baking_denunciation.create cctxt ~preserved_levels valid_blocks_stream >>=? fun () ->
return_unit return_unit