Shell: add more timeout in the prevalidator

This commit is contained in:
Grégoire Henry 2017-11-08 13:53:23 +01:00 committed by Benjamin Canou
parent f4c045b126
commit 16cc5b7ec8

View File

@ -243,6 +243,7 @@ let create net_db =
ops in ops in
let fetch op = let fetch op =
Distributed_db.Operation.fetch Distributed_db.Operation.fetch
~timeout:10. (* TODO allow to adjust the constant ... *)
net_db ~peer:gid op () >>= fun _op -> net_db ~peer:gid op () >>= fun _op ->
push_to_worker (`Handle op) ; push_to_worker (`Handle op) ;
Lwt.return_unit Lwt.return_unit
@ -252,7 +253,10 @@ let create net_db =
unknown_ops ; unknown_ops ;
List.iter (fun op -> List.iter (fun op ->
Lwt.ignore_result Lwt.ignore_result
(Distributed_db.Operation.fetch net_db ~peer:gid op ())) (Distributed_db.Operation.fetch
(* TODO allow to adjust the constant ... *)
~timeout:10.
net_db ~peer:gid op ()))
known_ops ; known_ops ;
Lwt.return_unit Lwt.return_unit
| `Handle op -> | `Handle op ->