aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/blocktools.py
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-04-03 15:35:59 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-04-03 15:54:35 +0200
commitff5874bcf7e391acf3b454c11c21636547400818 (patch)
tree5bf4080f939dcb44923edb98f3f13fdf9ae897f3 /qa/rpc-tests/test_framework/blocktools.py
parente0b3e19816b62fdf6faeda44459f30945241fbd8 (diff)
parent444480649f08e6037f8ac178224b30a82e9ad72e (diff)
Merge #7778: [qa] Bug fixes and refactor
4444806 [qa] mininode: Combine struct.pack format strings (MarcoFalke) faaa3c9 [qa] mininode: Catch exceptions in got_data (MarcoFalke) fa2cea1 [qa] rpc-tests: Properly use integers, floats (MarcoFalke) fa524d9 [qa] Use python2/3 syntax (MarcoFalke)
Diffstat (limited to 'qa/rpc-tests/test_framework/blocktools.py')
-rw-r--r--qa/rpc-tests/test_framework/blocktools.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/qa/rpc-tests/test_framework/blocktools.py b/qa/rpc-tests/test_framework/blocktools.py
index b075f69c47..afa0f5f9ba 100644
--- a/qa/rpc-tests/test_framework/blocktools.py
+++ b/qa/rpc-tests/test_framework/blocktools.py
@@ -4,8 +4,8 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
-from mininode import *
-from script import CScript, OP_TRUE, OP_CHECKSIG
+from .mininode import *
+from .script import CScript, OP_TRUE, OP_CHECKSIG
# Create a block (with regtest difficulty)
def create_block(hashprev, coinbase, nTime=None):
@@ -29,7 +29,7 @@ def serialize_script_num(value):
neg = value < 0
absvalue = -value if neg else value
while (absvalue):
- r.append(chr(absvalue & 0xff))
+ r.append(int(absvalue & 0xff))
absvalue >>= 8
if r[-1] & 0x80:
r.append(0x80 if neg else 0)