Prevalidator: log_debug canceled operation fetches
This commit is contained in:
parent
d5a2bd9604
commit
602a10651c
@ -243,10 +243,18 @@ let create net_db =
|
||||
let fetch op =
|
||||
Distributed_db.Operation.fetch
|
||||
~timeout:10. (* TODO allow to adjust the constant ... *)
|
||||
net_db ~peer:gid op () >>= fun _op ->
|
||||
net_db ~peer:gid op () >>= function
|
||||
| Ok _op ->
|
||||
push_to_worker (`Handle op) ;
|
||||
Lwt.return_unit
|
||||
in
|
||||
| Error [ Distributed_db.Operation.Canceled _ ] ->
|
||||
lwt_debug
|
||||
"operation %a included before being prevalidated"
|
||||
Operation_hash.pp_short op >>= fun () ->
|
||||
Lwt.return_unit
|
||||
| Error _ ->
|
||||
(* should not happen *)
|
||||
Lwt.return_unit in
|
||||
List.iter
|
||||
(fun op -> Operation_hash.Table.add pending op (fetch op))
|
||||
unknown_ops ;
|
||||
|
Loading…
Reference in New Issue
Block a user