aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-22 09:06:28 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-22 09:00:56 -0400
commitfaff9e4bb431919a4bc7e4dc4a9ca188e2d18113 (patch)
treea4a40705a8dc1955692cfd533e81428d340105bd /test/functional/test_framework
parent9e8e813df5f19ff154d9314f2d039eb6153f06c4 (diff)
test: Remove unused, undocumented and misleading CScript.__add__
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r--test/functional/test_framework/script.py11
-rwxr-xr-xtest/functional/test_framework/script_util.py1
2 files changed, 3 insertions, 9 deletions
diff --git a/test/functional/test_framework/script.py b/test/functional/test_framework/script.py
index e587a77f64..016a2b4f0f 100644
--- a/test/functional/test_framework/script.py
+++ b/test/functional/test_framework/script.py
@@ -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()
diff --git a/test/functional/test_framework/script_util.py b/test/functional/test_framework/script_util.py
index 5ef67226c4..80fbae70bf 100755
--- a/test/functional/test_framework/script_util.py
+++ b/test/functional/test_framework/script_util.py
@@ -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])