Verified Commit 3650f7e2 authored by sribst's avatar sribst

Shell:#74 DELETE comment out annoying block to test

parent 2815f704
......@@ -405,31 +405,30 @@ let on_error w r st err =
| Block_validator_errors.System_error _ :: _ ->
Worker.record_event w (Event.Request (r, st, Some err)) ;
return_unit
| Block_validator_errors.Unavailable_protocol {protocol; _} :: _ -> (
Block_validator.fetch_and_compile_protocol
pv.parameters.block_validator
~peer:pv.peer_id
~timeout:pv.parameters.limits.protocol_timeout
protocol
>>= function
| Ok _ ->
Distributed_db.Request.current_head
pv.parameters.chain_db
~peer:pv.peer_id
() ;
return_unit
| Error _ ->
(* TODO: punish *)
debug
w
"Terminating the validation worker for peer %a (missing protocol \
%a)."
P2p_peer.Id.pp_short
pv.peer_id
Protocol_hash.pp_short
protocol ;
Worker.record_event w (Event.Request (r, st, Some err)) ;
Lwt.return_error err )
| Block_validator_errors.Unavailable_protocol {protocol; _} :: _ ->
(* Block_validator.fetch_and_compile_protocol
* pv.parameters.block_validator
* ~peer:pv.peer_id
* ~timeout:pv.parameters.limits.protocol_timeout
* protocol
* >>= function
* | Ok _ ->
* Distributed_db.Request.current_head
* pv.parameters.chain_db
* ~peer:pv.peer_id
* () ;
* return_unit
* | Error _ -> *)
(* TODO: punish *)
debug
w
"Terminating the validation worker for peer %a (missing protocol %a)."
P2p_peer.Id.pp_short
pv.peer_id
Protocol_hash.pp_short
protocol ;
Worker.record_event w (Event.Request (r, st, Some err)) ;
Lwt.return_error err
| Validation_errors.Too_short_locator _ :: _ ->
debug
w
......
......@@ -23,7 +23,7 @@
(* *)
(*****************************************************************************)
let build_rpc_directory block_validator state =
let build_rpc_directory _block_validator state =
let dir : unit RPC_directory.t ref = ref RPC_directory.empty in
let gen_register0 s f =
dir := RPC_directory.gen_register !dir s (fun () p q -> f p q)
......@@ -47,7 +47,7 @@ let build_rpc_directory block_validator state =
return p
| None ->
State.Protocol.read state hash) ;
register1 Protocol_services.S.fetch (fun hash () () ->
Block_validator.fetch_and_compile_protocol block_validator hash
>>=? fun _proto -> return_unit) ;
(* register1 Protocol_services.S.fetch (fun hash () () ->
* Block_validator.fetch_and_compile_protocol block_validator hash
* >>=? fun _proto -> return_unit) ; *)
!dir
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment