diff options
| author | MarcoFalke <[email protected]> | 2020-02-28 03:25:49 +0700 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-02-28 03:26:36 +0700 |
| commit | fa2cf85e6f366d62ebf173bf0bd51af45806afe1 (patch) | |
| tree | bfc851182fa94ac92bef9f0022107922d7d6a1f8 | |
| parent | Merge #17461: test: check custom descendant limit in mempool_packages.py (diff) | |
| download | discoin-fa2cf85e6f366d62ebf173bf0bd51af45806afe1.tar.xz discoin-fa2cf85e6f366d62ebf173bf0bd51af45806afe1.zip | |
test: Fix race in p2p_segwit
Co-Authored-By: Suhas Daftuar <[email protected]>
| -rwxr-xr-x | test/functional/p2p_segwit.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index 3223c27e0..34f39f6e59 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -147,6 +147,11 @@ class TestP2PConn(P2PInterface): super().__init__() self.getdataset = set() + # Avoid sending out msg_getdata in the mininode thread as a reply to invs. + # They are not needed and would only lead to races because we send msg_getdata out in the test thread + def on_inv(self, message): + pass + def on_getdata(self, message): for inv in message.inv: self.getdataset.add(inv.hash) |