diff options
Diffstat (limited to 'qa/rpc-tests/bip9-softforks.py')
-rwxr-xr-x | qa/rpc-tests/bip9-softforks.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qa/rpc-tests/bip9-softforks.py b/qa/rpc-tests/bip9-softforks.py index cbb1b7d4ce..445c044944 100755 --- a/qa/rpc-tests/bip9-softforks.py +++ b/qa/rpc-tests/bip9-softforks.py @@ -11,7 +11,7 @@ from test_framework.blocktools import create_coinbase, create_block from test_framework.comptool import TestInstance, TestManager from test_framework.script import CScript, OP_1NEGATE, OP_NOP3, OP_DROP from binascii import hexlify, unhexlify -import cStringIO +from io import BytesIO import time import itertools @@ -53,7 +53,7 @@ class BIP9SoftForksTest(ComparisonTestFramework): outputs = { to_address : amount } rawtx = node.createrawtransaction(inputs, outputs) tx = CTransaction() - f = cStringIO.StringIO(unhexlify(rawtx)) + f = BytesIO(unhexlify(rawtx)) tx.deserialize(f) tx.nVersion = 2 return tx @@ -61,7 +61,7 @@ class BIP9SoftForksTest(ComparisonTestFramework): def sign_transaction(self, node, tx): signresult = node.signrawtransaction(hexlify(tx.serialize())) tx = CTransaction() - f = cStringIO.StringIO(unhexlify(signresult['hex'])) + f = BytesIO(unhexlify(signresult['hex'])) tx.deserialize(f) return tx @@ -217,4 +217,4 @@ class BIP9SoftForksTest(ComparisonTestFramework): tx.nLockTime = self.last_block_time if __name__ == '__main__': - BIP9SoftForksTest().main()
\ No newline at end of file + BIP9SoftForksTest().main() |