diff options
author | MacroFake <falke.marco@gmail.com> | 2022-11-04 16:50:22 +0100 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-11-04 16:50:42 +0100 |
commit | e42ba134f4a06980cb2d8a134a50ada5562063d8 (patch) | |
tree | 47f8cd1b9d8c75365dde90e5bf4d9a7df4c97d96 /src/net_processing.cpp | |
parent | 83cf055bef8032bc4dea76807eae6318f1e83aea (diff) | |
parent | 74d975318a1443aebfbcee36e331df4e54ec1fbe (diff) |
Merge bitcoin/bitcoin#26448: test: fix intermittent failure in p2p_sendtxrcncl.py
74d975318a1443aebfbcee36e331df4e54ec1fbe test: fix intermittent failure in p2p_sendtxrcncl.py (Martin Zumsande)
Pull request description:
`p2p_sendtxrcncl.py` currently fails intermittently in the CI, see e.g. https://cirrus-ci.com/task/5511952184115200?logs=ci#L4024
I believe that this is related to the reuse of the parameter `p2p_idx=2` of `add_outbound_p2p_connection` in this test: When we call `peer_disconnect`, we don't wait until the node has completed the disconnection. So there is a race between setting up the next connection (next `addconnection` RPC), and if the old one hasn't been removed and has an identical port like the new one (because we didn't increment `p2p_idx`), `CConnman::OpenNetworkConnection` just [returns](https://github.com/bitcoin/bitcoin/blob/5274f324375fd31cf8507531fbc612765d03092f/src/net.cpp#L1976) without establishing a connection, and the test fails.
Fix this by using distinct `disconnect_p2ps` instead of `peer_disconnect`, which waits for the disconnect to complete. We can then use the same value for `p2p_idx` everywhere.
ACKs for top commit:
MarcoFalke:
review ACK 74d975318a1443aebfbcee36e331df4e54ec1fbe
Tree-SHA512: f99f2550b6b320c0a2416a475c1cf189c009fce3a5abf1d4462486e1bfe309e2c3fd4228a4009b0ca38cb77465ce85e3d22298719eb07302fa0a72fbab0e0668
Diffstat (limited to 'src/net_processing.cpp')
0 files changed, 0 insertions, 0 deletions