aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/bip9-softforks.py
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-04-14 16:38:07 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-04-14 17:40:31 +0200
commit6ef5e000a26be15919a4006f4b879fcaea8915c5 (patch)
tree4a280dbaa57968cb89fb57b3d8694d2621aa273d /qa/rpc-tests/bip9-softforks.py
parent430fffefaab6832b8f6605f14a992e7e55b9547e (diff)
parentfaa41ee204124da19dcf1e5b8a3aef1e216bf5e6 (diff)
downloadbitcoin-6ef5e000a26be15919a4006f4b879fcaea8915c5.tar.xz
Merge #7853: [qa] py2: Unfiddle strings into bytes explicitly
faa41ee [qa] py2: Unfiddle strings into bytes explicitly (MarcoFalke)
Diffstat (limited to 'qa/rpc-tests/bip9-softforks.py')
-rwxr-xr-xqa/rpc-tests/bip9-softforks.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/qa/rpc-tests/bip9-softforks.py b/qa/rpc-tests/bip9-softforks.py
index e63343d352..ddca3c2e33 100755
--- a/qa/rpc-tests/bip9-softforks.py
+++ b/qa/rpc-tests/bip9-softforks.py
@@ -10,7 +10,6 @@ from test_framework.mininode import CTransaction, NetworkThread
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
from io import BytesIO
import time
import itertools
@@ -30,7 +29,6 @@ test that enforcement has triggered
'''
-
class BIP9SoftForksTest(ComparisonTestFramework):
def __init__(self):
@@ -53,15 +51,15 @@ class BIP9SoftForksTest(ComparisonTestFramework):
outputs = { to_address : amount }
rawtx = node.createrawtransaction(inputs, outputs)
tx = CTransaction()
- f = BytesIO(unhexlify(rawtx))
+ f = BytesIO(hex_str_to_bytes(rawtx))
tx.deserialize(f)
tx.nVersion = 2
return tx
def sign_transaction(self, node, tx):
- signresult = node.signrawtransaction(hexlify(tx.serialize()))
+ signresult = node.signrawtransaction(bytes_to_hex_str(tx.serialize()))
tx = CTransaction()
- f = BytesIO(unhexlify(signresult['hex']))
+ f = BytesIO(hex_str_to_bytes(signresult['hex']))
tx.deserialize(f)
return tx
@@ -180,7 +178,6 @@ class BIP9SoftForksTest(ComparisonTestFramework):
NetworkThread().start() # Start up network handling in another thread
-
def get_tests(self):
for test in itertools.chain(
self.test_BIP('csv', 536870913, self.sequence_lock_invalidate, self.donothing),