Shell/RPC: fix filtering of next_protocols
in GET /monitor/heads
This commit is contained in:
parent
378c4e2780
commit
f9dd92d6b4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user