@@ -164,7 +164,7 @@ def on_getdata(self, message):
164
164
def on_wtxidrelay (self , message ):
165
165
self .last_wtxidrelay .append (message )
166
166
167
- def announce_tx_and_wait_for_getdata (self , tx , timeout = 60 , success = True , use_wtxid = False ):
167
+ def announce_tx_and_wait_for_getdata (self , tx , success = True , use_wtxid = False ):
168
168
if success :
169
169
# sanity check
170
170
assert (self .wtxidrelay and use_wtxid ) or (not self .wtxidrelay and not use_wtxid )
@@ -178,11 +178,11 @@ def announce_tx_and_wait_for_getdata(self, tx, timeout=60, success=True, use_wtx
178
178
179
179
if success :
180
180
if use_wtxid :
181
- self .wait_for_getdata ([wtxid ], timeout )
181
+ self .wait_for_getdata ([wtxid ])
182
182
else :
183
- self .wait_for_getdata ([tx .sha256 ], timeout )
183
+ self .wait_for_getdata ([tx .sha256 ])
184
184
else :
185
- time .sleep (timeout )
185
+ time .sleep (5 )
186
186
assert not self .last_message .get ("getdata" )
187
187
188
188
def announce_block_and_wait_for_getdata (self , block , use_header , timeout = 60 ):
@@ -604,7 +604,7 @@ def test_witness_tx_relay_before_segwit_activation(self):
604
604
605
605
# Since we haven't delivered the tx yet, inv'ing the same tx from
606
606
# a witness transaction ought not result in a getdata.
607
- self .test_node .announce_tx_and_wait_for_getdata (tx , timeout = 2 , success = False )
607
+ self .test_node .announce_tx_and_wait_for_getdata (tx , success = False )
608
608
609
609
# Delivering this transaction with witness should fail (no matter who
610
610
# its from)
@@ -1461,7 +1461,7 @@ def test_segwit_versions(self):
1461
1461
self .std_node .announce_tx_and_wait_for_getdata (tx3 )
1462
1462
test_transaction_acceptance (self .nodes [1 ], self .std_node , tx3 , with_witness = True , accepted = False , reason = "bad-txns-nonstandard-inputs" )
1463
1463
# Now the node will no longer ask for getdata of this transaction when advertised by same txid
1464
- self .std_node .announce_tx_and_wait_for_getdata (tx3 , timeout = 5 , success = False )
1464
+ self .std_node .announce_tx_and_wait_for_getdata (tx3 , success = False )
1465
1465
1466
1466
# Spending a higher version witness output is not allowed by policy,
1467
1467
# even with fRequireStandard=false.
0 commit comments