mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Merge #18213: test: Fix race in p2p_segwit
fa2cf85e6f
test: Fix race in p2p_segwit (MarcoFalke)
Pull request description:
Fixes #11696
Top commit has no ACKs.
Tree-SHA512: 09de07ea26236547586f5c373a0df2b68d84af5cfa8f40bd2ca9f951fc083c5f4b8a472a60668d99118bbd9f3942ec3d6a34f05944d47345acca41c95475bb27
This commit is contained in:
commit
2737197ff3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user