mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
test: Remove unused, undocumented and misleading CScript.__add__
This commit is contained in:
@@ -449,15 +449,8 @@ class CScript(bytes):
|
||||
return other
|
||||
|
||||
def __add__(self, other):
|
||||
# Do the coercion outside of the try block so that errors in it are
|
||||
# noticed.
|
||||
other = self.__coerce_instance(other)
|
||||
|
||||
try:
|
||||
# bytes.__add__ always returns bytes instances unfortunately
|
||||
return CScript(super(CScript, self).__add__(other))
|
||||
except TypeError:
|
||||
raise TypeError('Can not add a %r instance to a CScript' % other.__class__)
|
||||
# add makes no sense for a CScript()
|
||||
raise NotImplementedError
|
||||
|
||||
def join(self, iterable):
|
||||
# join makes no sense for a CScript()
|
||||
|
||||
@@ -23,3 +23,4 @@ from test_framework.script import CScript
|
||||
# scriptPubKeys are needed, to guarantee that the minimum transaction size is
|
||||
# met.
|
||||
DUMMY_P2WPKH_SCRIPT = CScript([b'a' * 21])
|
||||
DUMMY_2_P2WPKH_SCRIPT = CScript([b'b' * 21])
|
||||
|
||||
Reference in New Issue
Block a user