package octez-shell-libs
Octez shell libraries
Install
Dune Dependency
Authors
Maintainers
Sources
tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-shell-libs.p2p_test_common/Tezos_p2p_test_common/P2p_test_utils/index.html
Module Tezos_p2p_test_common.P2p_test_utils
Source
This module provides functions used for tests.
Is a timeout used with wait_pred
function.
Source
val wait_pred :
?timeout:'a timeout_t ->
pred:('a -> bool) ->
arg:'a ->
unit ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
wait_pred
wait until pred arg
is true. If pred
is not satisfy after timeout.time
seconds a Timeout (timeout.msg arg)
error is raised.
Source
val wait_pred_s :
?timeout:'a timeout_t ->
pred:('a -> bool Lwt.t) ->
arg:'a ->
unit ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
Same as wait_pred
.
Source
val wait_conns :
?timeout:float ->
pool:('a, 'b, 'c) Tezos_p2p.P2p_pool.t ->
int ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
Based on wait_pred
. wait_conns ~pool n
waits until at least n
connections are actives in ~pool
.
Source
val connect_all :
?timeout:Tezos_base.TzPervasives.Time.System.Span.t ->
('a, 'b, 'c) Tezos_p2p.P2p_connect_handler.t ->
Tezos_base.TzPervasives.P2p_point.Id.t list ->
('a, 'b, 'c) Tezos_p2p.P2p_conn.t list Tezos_base.TzPervasives.tzresult Lwt.t
connect_all connect_handler points
establishes the connections to points
using connect_handler
and returns them. If one connection need more than ?timeout
seconds to be established, the function fails with Timeout
error.
close_active_conns pool@
closes all actives connections of the pool. This function waits until the connections are effectively closed.
Source
val run_nodes :
addr:Tezos_base.TzPervasives.P2p_addr.t ->
?port:int ->
((unit, unit) Process.Channel.t ->
Tezos_p2p.P2p_io_scheduler.t ->
Ipaddr.V6.t ->
int ->
(unit, Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace) result
Lwt.t) ->
((unit, unit) Process.Channel.t ->
Tezos_p2p.P2p_io_scheduler.t ->
Lwt_unix.file_descr ->
(unit, Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace) result
Lwt.t) ->
(unit, Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace) result
Lwt.t
Source
val run_nodes_fd :
addr:Tezos_base.TzPervasives.P2p_addr.t ->
?port:int ->
((unit, unit) Process.Channel.t ->
Ipaddr.V6.t ->
int ->
(unit, Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace) result
Lwt.t) ->
((unit, unit) Process.Channel.t ->
Lwt_unix.file_descr ->
(unit, Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace) result
Lwt.t) ->
(unit, Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace) result
Lwt.t
Source
val raw_accept :
Tezos_p2p.P2p_io_scheduler.t ->
Lwt_unix.file_descr ->
(Tezos_p2p.P2p_io_scheduler.connection
* (Tezos_base.TzPervasives.P2p_addr.t * int),
Tezos_p2p.P2p_fd.accept_error)
result
Lwt.t
Source
val accept :
?id:Tezos_base.TzPervasives.P2p_identity.t Lwt.t ->
?proof_of_work_target:Tezos_crypto.Crypto_box.pow_target ->
Tezos_p2p.P2p_io_scheduler.t ->
Lwt_unix.file_descr ->
(unit Tezos_base.TzPervasives.P2p_connection.Info.t
* unit Tezos_p2p.P2p_socket.authenticated_connection,
Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace)
result
Lwt.t
Source
val raw_connect :
Tezos_p2p.P2p_io_scheduler.t ->
Tezos_base.TzPervasives.P2p_addr.t ->
int ->
(Tezos_p2p.P2p_io_scheduler.connection, Tezos_p2p.P2p_fd.connect_error)
result
Lwt.t
Source
val connect :
?proof_of_work_target:Tezos_crypto.Crypto_box.pow_target ->
Tezos_p2p.P2p_io_scheduler.t ->
Tezos_base.TzPervasives.P2p_addr.t ->
int ->
Tezos_base.TzPervasives.P2p_identity.t ->
(unit Tezos_base.TzPervasives.P2p_connection.Info.t
* unit Tezos_p2p.P2p_socket.authenticated_connection,
Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace)
result
Lwt.t
Source
val sync :
(unit, unit) Process.Channel.t ->
(unit, Tezos_base.TzPervasives.error Tezos_base.TzPervasives.trace) result
Lwt.t
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>