Skip to content

Commit fa2cf85

Browse files
MarcoFalkesdaftuar
andcommitted
test: Fix race in p2p_segwit
Co-Authored-By: Suhas Daftuar <[email protected]>
1 parent 1615043 commit fa2cf85

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/functional/p2p_segwit.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ def __init__(self):
147147
super().__init__()
148148
self.getdataset = set()
149149

150+
# Avoid sending out msg_getdata in the mininode thread as a reply to invs.
151+
# They are not needed and would only lead to races because we send msg_getdata out in the test thread
152+
def on_inv(self, message):
153+
pass
154+
150155
def on_getdata(self, message):
151156
for inv in message.inv:
152157
self.getdataset.add(inv.hash)

0 commit comments

Comments
 (0)