* Refactor setup of `Connection` test vectors Add a `new_test_connection` helper function to create a `Connection` instance that's ready for testing. * Check that no inbound requests are sent Return the mock inbound service from `new_test_connection` and assert that no requests were sent to it in any test. * Replace `&mut Vec<u8>` with an `mpsc` channel Make it easier to run the connection task in the background, i.e., remove any lifetime constraints from the borrowed buffer so that `Connection` is `'static`. It's now also easier to assert on individual messages sent from the `Connection` instance. * Make `MockServiceBuilder::finish` public Allow test functions to be generic when creating a `MockService`, so that caller functions actually determine if the type of `MockService` assertions. * Move `new_test_connection` to parent module Make it more generic so that it can be used later in property tests as well. * Derive `Eq` and `PartialEq` for network `Response` Allow intercepted `Response` instances to be easily compared in tests. * Test block request cancel causes an error cascade This is the scenario that caused the block synchronizer to reset every few minutes, which made it considerably slower. * Ignore unexpected block responses It's likely that it's just a response for a previously cancelled block request. |
||
|---|---|---|
| .. | ||
| client | ||
| connection | ||
| minimum_peer_version | ||
| client.rs | ||
| connection.rs | ||
| connector.rs | ||
| error.rs | ||
| handshake.rs | ||
| load_tracked_client.rs | ||
| minimum_peer_version.rs | ||