aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-04-16 11:53:56 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-04-16 11:53:57 -0400
commit6a278e06400934df0fc6ed81b0d7c645efc50bdf (patch)
treec6c0d0e1c1931db1ac6876714e568ed774bb3e0a /test/functional
parentfe8fa22d7a4a0da56c2369b4dabef421b2403eee (diff)
parent9db48c56343c2ea32827ad5b3c75ed6e816eed07 (diff)
Merge #12996: tests: Remove redundant bytes(…) calls
9db48c5634 tests: Remove redundant bytes² (practicalswift) Pull request description: This is a follow-up to #12993. As @jnewbery noted `bytes()` is idempotent. Tree-SHA512: 0eb25e0c2c46f9abaac30f964c5eb422bece1414c840a717d86794424294cb19d995a6db7c8df2a2f4ec84776b05274a637f2c111738f397051f510e57184752
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/test_framework/script.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/script.py b/test/functional/test_framework/script.py
index f0082bd2a3..44650d7584 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)):