From 9db48c56343c2ea32827ad5b3c75ed6e816eed07 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 16 Apr 2018 17:33:03 +0200 Subject: [PATCH] =?UTF-8?q?tests:=20Remove=20redundant=20bytes=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/functional/test_framework/script.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/test_framework/script.py b/test/functional/test_framework/script.py index f0082bd2a3a..44650d75843 100644 --- a/test/functional/test_framework/script.py +++ b/test/functional/test_framework/script.py @@ -379,7 +379,7 @@ class CScriptNum(): r.append(0x80 if neg else 0) elif neg: r[-1] |= 0x80 - return bytes(bytes([len(r)]) + r) + return bytes([len(r)]) + r class CScript(bytes): @@ -404,9 +404,9 @@ class CScript(bytes): other = CScriptNum.encode(other) elif isinstance(other, int): if 0 <= other <= 16: - other = bytes(bytes([CScriptOp.encode_op_n(other)])) + other = bytes([CScriptOp.encode_op_n(other)]) elif other == -1: - other = bytes(bytes([OP_1NEGATE])) + other = bytes([OP_1NEGATE]) else: other = CScriptOp.encode_op_pushdata(bn2vch(other)) elif isinstance(other, (bytes, bytearray)):