diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-04-10 16:54:28 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-04-10 20:35:57 +0200 |
commit | faa41ee204124da19dcf1e5b8a3aef1e216bf5e6 (patch) | |
tree | 4b33bcb6db57bcde90e12d1b0e9140c4d8cb32ba /qa/rpc-tests/bipdersig-p2p.py | |
parent | 0afac87e8173dd71616e211aa08dcd59cb5cf90e (diff) |
[qa] py2: Unfiddle strings into bytes explicitly
Diffstat (limited to 'qa/rpc-tests/bipdersig-p2p.py')
-rwxr-xr-x | qa/rpc-tests/bipdersig-p2p.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qa/rpc-tests/bipdersig-p2p.py b/qa/rpc-tests/bipdersig-p2p.py index 95be385d93..bba86a50c4 100755 --- a/qa/rpc-tests/bipdersig-p2p.py +++ b/qa/rpc-tests/bipdersig-p2p.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 -from binascii import unhexlify from io import BytesIO import time @@ -25,7 +24,7 @@ def unDERify(tx): newscript = [] for i in scriptSig: if (len(newscript) == 0): - newscript.append(i[0:-1] + '\0' + i[-1]) + newscript.append(i[0:-1] + b'\0' + i[-1:]) else: newscript.append(i) tx.vin[0].scriptSig = CScript(newscript) @@ -68,7 +67,7 @@ class BIP66Test(ComparisonTestFramework): rawtx = node.createrawtransaction(inputs, outputs) signresult = node.signrawtransaction(rawtx) tx = CTransaction() - f = BytesIO(unhexlify(signresult['hex'])) + f = BytesIO(hex_str_to_bytes(signresult['hex'])) tx.deserialize(f) return tx |