- Would it make sense for this new test to be in
p2p_tx_download.py where we have similar testing?
- Perhaps also test that
tx_getdata_count is/can be greater than zero once out of IBD?
A few PEP8 suggestions and (maybe, IIUC) a clarifying constant:
--- a/test/functional/p2p_ibd_txrelay.py
+++ b/test/functional/p2p_ibd_txrelay.py
@@ -8,6 +8,7 @@
"""
from decimal import Decimal
+import time
@@ -25,10 +26,10 @@ from test_framework.util import (
-import time
MAX_FEE_FILTER = Decimal(9170997) / COIN
NORMAL_FEE_FILTER = Decimal(100) / COIN
+WTXID = 0xffaa
@@ -43,7 +44,7 @@ class P2PIBDTxRelayTest(BitcoinTestFramework):
peer = self.nodes[0].add_p2p_connection(P2PInterface())
- peer.send_message(msg_inv([CInv(t=MSG_WTX, h=0xffaa)]))
+ peer.send_message(msg_inv([CInv(t=MSG_WTX, h=WTXID)]))
@@ -73,5 +74,6 @@ class P2PIBDTxRelayTest(BitcoinTestFramework):
self.test_feefilter_ibd()
+
if __name__ == '__main__':
--- a/test/functional/test_framework/p2p.py
+++ b/test/functional/test_framework/p2p.py
@@ -122,7 +122,7 @@ MAGIC_BYTES = {
# Constants from net_processing
NONPREF_PEER_TX_DELAY = 2 # seconds
-TXID_RELAY_DELAY = 2 # seconds
+TXID_RELAY_DELAY = 2 # seconds