Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix a race in rpc_net.py (wait for P2P handshake to complete)
We connect a new peer, wait for it using `self.nodes[0].wait_for_new_peer()` and then demand that "transport_protocol_type" is either "v1" or "v2". However `wait_for_new_peer()` may return too early - during the P2P handshake when "transport_protocol_type" is "detecting". Fix this by waiting for the P2P handshake to complete and the protocol version to be established. An example failure (equal fields removed for clarity): ``` AssertionError: not({ ... 'session_id': '', 'transport_protocol_type': 'detecting', } == { ... 'session_id': '8fe5902166b892a57ac6849caadd02d2dff83d84f2e57ee50bf894f93cf2f62e', 'transport_protocol_type': 'v2', }) ```
- Loading branch information