[Test] MiniNode: Coerce OP_PUSHDATA bytearrays to bytes
If a bytearray is passed in as part of an iterable, the CScript constructor fails because b''.join() cannot be used to join a bytearray to a bytes or str in Python 2.
This commit is contained in:
parent
643235859a
commit
7596a4922d
|
@ -666,7 +666,7 @@ class CScript(bytes):
|
|||
else:
|
||||
other = CScriptOp.encode_op_pushdata(bignum.bn2vch(other))
|
||||
elif isinstance(other, (bytes, bytearray)):
|
||||
other = CScriptOp.encode_op_pushdata(other)
|
||||
other = bytes(CScriptOp.encode_op_pushdata(other))
|
||||
return other
|
||||
|
||||
def __add__(self, other):
|
||||
|
|
Loading…
Reference in New Issue