Zebra/zebra-network/src
teor c76ff56cd1
fix(network): Add a send timeout to outbound peer messages (#3417)
* fix(network): add a send timeout to outbound peer messages

* test(network): test peer send and receive timeouts

And the equivalent success cases:
- spawn the run loop with no messages
- spawn the run loop and send and receive a message

* test(network): check for specific error types in the tests

And add an outbound error test that doesn't expect a response.

* test(network): use bounded fake peer connection channels

This lets us actually trigger send timeouts in the tests.

* refactor(network): rename some confusing types and variables

fastmod peer_inbound_tx peer_tx zebra*
fastmod peer_inbound_rx peer_rx zebra*

fastmod ClientSendTimeout ConnectionSendTimeout zebra*
fastmod ClientReceiveTimeout ConnectionReceiveTimeout zebra*

* doc(network test): explain the purpose of each peer connection test vector
2022-01-31 15:22:00 -03:00
..
address_book Security: Limit address book size to limit memory usage (#3162) 2021-12-06 16:09:10 -03:00
config Use the default port for configured listen addresses with no port (#2043) 2021-04-21 23:14:29 +00:00
isolated T2. Add isolated Tor connection API, but don't enable it by default (#3303) 2022-01-25 01:46:31 +00:00
meta_addr Stop ignoring some peers when updating the address book (#3292) 2022-01-05 18:12:59 -05:00
peer fix(network): Add a send timeout to outbound peer messages (#3417) 2022-01-31 15:22:00 -03:00
peer_set T1. Fix isolated connection bugs, improve tests, upgrade dependencies (#3302) 2022-01-14 19:34:59 +00:00
protocol Ignore unexpected block responses to fix error cascade when synchronizing blocks (#3374) 2022-01-20 08:14:16 +00:00
address_book.rs 1. Fix some address crawler timing issues (#3293) 2022-01-04 18:43:30 -05:00
address_book_updater.rs feat(log): log the state tip height as part of sync progress logs (#3437) 2022-01-28 19:12:19 -03:00
config.rs T2. Add isolated Tor connection API, but don't enable it by default (#3303) 2022-01-25 01:46:31 +00:00
constants.rs fix(network): Add a send timeout to outbound peer messages (#3417) 2022-01-31 15:22:00 -03:00
isolated.rs T2. Add isolated Tor connection API, but don't enable it by default (#3303) 2022-01-25 01:46:31 +00:00
lib.rs T2. Add isolated Tor connection API, but don't enable it by default (#3303) 2022-01-25 01:46:31 +00:00
meta_addr.rs Stop ignoring some peers when updating the address book (#3292) 2022-01-05 18:12:59 -05:00
peer.rs Test for message broadcast to the right number of peers (#3284) 2021-12-31 00:26:50 +00:00
peer_set.rs Track the number of active inbound and outbound peer connections (#2912) 2021-10-21 21:36:42 +00:00
policies.rs Fix syncer download order and add sync tests (#3168) 2022-01-11 14:11:35 -03:00
protocol.rs Refactor protocol into internal, external modules. 2019-11-27 05:06:01 -05:00