aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/abandonconflict.py
diff options
context:
space:
mode:
Diffstat (limited to 'qa/rpc-tests/abandonconflict.py')
-rwxr-xr-xqa/rpc-tests/abandonconflict.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/qa/rpc-tests/abandonconflict.py b/qa/rpc-tests/abandonconflict.py
index a83aa97fcd..b6c4b9db48 100755
--- a/qa/rpc-tests/abandonconflict.py
+++ b/qa/rpc-tests/abandonconflict.py
@@ -1,15 +1,12 @@
-#!/usr/bin/env python2
-# Copyright (c) 2014-2015 The Bitcoin Core developers
+#!/usr/bin/env python3
+# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
-try:
- import urllib.parse as urlparse
-except ImportError:
- import urlparse
+import urllib.parse
class AbandonConflictTest(BitcoinTestFramework):
@@ -34,7 +31,7 @@ class AbandonConflictTest(BitcoinTestFramework):
assert(balance - newbalance < Decimal("0.001")) #no more than fees lost
balance = newbalance
- url = urlparse.urlparse(self.nodes[1].url)
+ url = urllib.parse.urlparse(self.nodes[1].url)
self.nodes[0].disconnectnode(url.hostname+":"+str(p2p_port(1)))
# Identify the 10btc outputs
@@ -151,9 +148,9 @@ class AbandonConflictTest(BitcoinTestFramework):
self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
newbalance = self.nodes[0].getbalance()
#assert(newbalance == balance - Decimal("10"))
- print "If balance has not declined after invalidateblock then out of mempool wallet tx which is no longer"
- print "conflicted has not resumed causing its inputs to be seen as spent. See Issue #7315"
- print balance , " -> " , newbalance , " ?"
+ print("If balance has not declined after invalidateblock then out of mempool wallet tx which is no longer")
+ print("conflicted has not resumed causing its inputs to be seen as spent. See Issue #7315")
+ print(str(balance) + " -> " + str(newbalance) + " ?")
if __name__ == '__main__':
AbandonConflictTest().main()