mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 10:42:23 +02:00
test: Fix race in p2p_segwit
Co-Authored-By: Suhas Daftuar <sdaftuar@gmail.com>
This commit is contained in:
@ -147,6 +147,11 @@ class TestP2PConn(P2PInterface):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.getdataset = set()
|
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):
|
def on_getdata(self, message):
|
||||||
for inv in message.inv:
|
for inv in message.inv:
|
||||||
self.getdataset.add(inv.hash)
|
self.getdataset.add(inv.hash)
|
||||||
|
Reference in New Issue
Block a user