mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
test: Fix race in p2p_segwit
Co-Authored-By: Suhas Daftuar <sdaftuar@gmail.com>
This commit is contained in:
parent
1615043935
commit
fa2cf85e6f
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue