p2p_ibd_txrelay
expects no GETDATA to have been received by a peer after announcing a transaction. The reason is that the node is doing IBD, so transaction requests are not replied to. However, the way this is checked is wrong, and the check will pass even if the node was not in IBD.
This is due to the mocktime not being properly initialized, so the check is always performed earlier than it should, making it impossible for the request to be there.
This can be checked by modifying the test so the peer is not doing IBD, and checking how the test succeeds on that assert (even though it fails later on, given the nature of the test):
0index 882f5b5c13..3a69ae5860 100755
1--- a/test/functional/p2p_ibd_txrelay.py
2+++ b/test/functional/p2p_ibd_txrelay.py
3@@ -34,7 +34,7 @@ NORMAL_FEE_FILTER = Decimal(100) / COIN
4
5 class P2PIBDTxRelayTest(BitcoinTestFramework):
6 def set_test_params(self):
7- self.setup_clean_chain = True
8+ # self.setup_clean_chain = True
9 self.num_nodes = 2
10 self.extra_args = [
11 ["-minrelaytxfee={}".format(NORMAL_FEE_FILTER)],
12@@ -43,9 +43,11 @@ class P2PIBDTxRelayTest(BitcoinTestFramework):
13
14 def run_test(self):
15 self.log.info("Check that nodes set minfilter to MAX_MONEY while still in IBD")
16- for node in self.nodes:
17- assert node.getblockchaininfo()['initialblockdownload']
18- self.wait_until(lambda: all(peer['minfeefilter'] == MAX_FEE_FILTER for peer in node.getpeerinfo()))
19+ # for node in self.nodes:
20+ # assert node.getblockchaininfo()['initialblockdownload']
21+ # self.wait_until(lambda: all(peer['minfeefilter'] == MAX_FEE_FILTER for peer in node.getpeerinfo()))