File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ def setup_network(self):
62
62
63
63
def run_test (self ):
64
64
node1 = self .nodes [1 ]
65
+ node0 = self .nodes [0 ]
65
66
# Get out of IBD
66
67
node1 .generate (1 )
67
68
sync_blocks (self .nodes )
@@ -91,8 +92,17 @@ def run_test(self):
91
92
node1 .settxfee (Decimal ("0.00010000" ))
92
93
[node1 .sendtoaddress (node1 .getnewaddress (), 1 ) for x in range (3 )]
93
94
sync_mempools (self .nodes ) # must be sure node 0 has received all txs
94
- time .sleep (10 ) # wait 10 secs to be sure its doesn't relay any
95
- assert (allInvsMatch ([], test_node ))
95
+
96
+ # Send one transaction from node0 that should be received, so that we
97
+ # we can sync the test on receipt (if node1's txs were relayed, they'd
98
+ # be received by the time this node0 tx is received). This is
99
+ # unfortunately reliant on the current relay behavior where we batch up
100
+ # to 35 entries in an inv, which means that when this next transaction
101
+ # is eligible for relay, the prior transactions from node1 are eligible
102
+ # as well.
103
+ node0 .settxfee (Decimal ("0.00020000" ))
104
+ txids = [node0 .sendtoaddress (node0 .getnewaddress (), 1 )]
105
+ assert (allInvsMatch (txids , test_node ))
96
106
test_node .clear_invs ()
97
107
98
108
# Remove fee filter and check that txs are received again
You can’t perform that action at this time.
0 commit comments