aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2016-08-01 12:40:38 -0400
committerMarcoFalke <falke.marco@gmail.com>2016-08-04 14:01:53 +0200
commitcd0910b7874f9e6fbb6b15115d054a25e3abbe68 (patch)
tree5a7ff5e1ec59c35d1742d568fdcd4fa5ca8c5df3 /qa/rpc-tests
parentb8b97c98e86f81cd11a3c582dcea1c201139f187 (diff)
Fix p2p-feefilter.py for changed tx relay behavior
Github-Pull: #8444 Rebased-From: 2c517b3928a68c6e36b18262081a401a741cd4cd
Diffstat (limited to 'qa/rpc-tests')
-rwxr-xr-xqa/rpc-tests/p2p-feefilter.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/qa/rpc-tests/p2p-feefilter.py b/qa/rpc-tests/p2p-feefilter.py
index cd0501a314..96d99d38a7 100755
--- a/qa/rpc-tests/p2p-feefilter.py
+++ b/qa/rpc-tests/p2p-feefilter.py
@@ -62,6 +62,7 @@ class FeeFilterTest(BitcoinTestFramework):
def run_test(self):
node1 = self.nodes[1]
+ node0 = self.nodes[0]
# Get out of IBD
node1.generate(1)
sync_blocks(self.nodes)
@@ -91,8 +92,17 @@ class FeeFilterTest(BitcoinTestFramework):
node1.settxfee(Decimal("0.00010000"))
[node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)]
sync_mempools(self.nodes) # must be sure node 0 has received all txs
- time.sleep(10) # wait 10 secs to be sure its doesn't relay any
- assert(allInvsMatch([], test_node))
+
+ # Send one transaction from node0 that should be received, so that we
+ # we can sync the test on receipt (if node1's txs were relayed, they'd
+ # be received by the time this node0 tx is received). This is
+ # unfortunately reliant on the current relay behavior where we batch up
+ # to 35 entries in an inv, which means that when this next transaction
+ # is eligible for relay, the prior transactions from node1 are eligible
+ # as well.
+ node0.settxfee(Decimal("0.00020000"))
+ txids = [node0.sendtoaddress(node0.getnewaddress(), 1)]
+ assert(allInvsMatch(txids, test_node))
test_node.clear_invs()
# Remove fee filter and check that txs are received again