aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/listtransactions.py
diff options
context:
space:
mode:
Diffstat (limited to 'qa/rpc-tests/listtransactions.py')
-rwxr-xr-xqa/rpc-tests/listtransactions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/qa/rpc-tests/listtransactions.py b/qa/rpc-tests/listtransactions.py
index da1e98dc33..8fe72d95d1 100755
--- a/qa/rpc-tests/listtransactions.py
+++ b/qa/rpc-tests/listtransactions.py
@@ -8,12 +8,12 @@
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
from test_framework.mininode import CTransaction, COIN
-import cStringIO
+from io import BytesIO
import binascii
def txFromHex(hexstring):
tx = CTransaction()
- f = cStringIO.StringIO(binascii.unhexlify(hexstring))
+ f = BytesIO(binascii.unhexlify(hexstring))
tx.deserialize(f)
return tx
@@ -192,7 +192,7 @@ class ListTransactionsTest(BitcoinTestFramework):
# Replace tx3, and check that tx4 becomes unknown
tx3_b = tx3_modified
- tx3_b.vout[0].nValue -= 0.004 * COIN # bump the fee
+ tx3_b.vout[0].nValue -= int(Decimal("0.004") * COIN) # bump the fee
tx3_b = binascii.hexlify(tx3_b.serialize()).decode('utf-8')
tx3_b_signed = self.nodes[0].signrawtransaction(tx3_b)['hex']
txid_3b = self.nodes[0].sendrawtransaction(tx3_b_signed, True)