aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/p2p-feefilter.py
diff options
context:
space:
mode:
Diffstat (limited to 'qa/rpc-tests/p2p-feefilter.py')
-rwxr-xr-xqa/rpc-tests/p2p-feefilter.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/qa/rpc-tests/p2p-feefilter.py b/qa/rpc-tests/p2p-feefilter.py
index 281b6ca37a..5fb51ed0fe 100755
--- a/qa/rpc-tests/p2p-feefilter.py
+++ b/qa/rpc-tests/p2p-feefilter.py
@@ -1,6 +1,6 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
@@ -18,7 +18,7 @@ def hashToHex(hash):
# Wait up to 60 secs to see if the testnode has received all the expected invs
def allInvsMatch(invsExpected, testnode):
- for x in xrange(60):
+ for x in range(60):
with mininode_lock:
if (sorted(invsExpected) == sorted(testnode.txinvs)):
return True;
@@ -69,7 +69,7 @@ class FeeFilterTest(BitcoinTestFramework):
# Test that invs are received for all txs at feerate of 20 sat/byte
node1.settxfee(Decimal("0.00020000"))
- txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in xrange(3)]
+ txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)]
assert(allInvsMatch(txids, test_node))
test_node.clear_invs()
@@ -77,13 +77,13 @@ class FeeFilterTest(BitcoinTestFramework):
test_node.send_filter(15000)
# Test that txs are still being received (paying 20 sat/byte)
- txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in xrange(3)]
+ txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)]
assert(allInvsMatch(txids, test_node))
test_node.clear_invs()
# Change tx fee rate to 10 sat/byte and test they are no longer received
node1.settxfee(Decimal("0.00010000"))
- [node1.sendtoaddress(node1.getnewaddress(), 1) for x in xrange(3)]
+ [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))
@@ -91,7 +91,7 @@ class FeeFilterTest(BitcoinTestFramework):
# Remove fee filter and check that txs are received again
test_node.send_filter(0)
- txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in xrange(3)]
+ txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)]
assert(allInvsMatch(txids, test_node))
test_node.clear_invs()