File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 10
10
from test_framework .script import CScript , OP_DROP
11
11
from test_framework .test_framework import BGLTestFramework
12
12
from test_framework .util import assert_equal , assert_raises_rpc_error , satoshi_round
13
- from test_framework .script_util import DUMMY_P2WPKH_SCRIPT
13
+ from test_framework .script_util import DUMMY_P2WPKH_SCRIPT , DUMMY_2_P2WPKH_SCRIPT
14
14
15
15
MAX_REPLACEMENT_LIMIT = 100
16
16
@@ -142,7 +142,7 @@ def test_simple_doublespend(self):
142
142
# Should fail because we haven't changed the fee
143
143
tx1b = CTransaction ()
144
144
tx1b .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
145
- tx1b .vout = [CTxOut (1 * COIN , DUMMY_P2WPKH_SCRIPT + b'a' )]
145
+ tx1b .vout = [CTxOut (1 * COIN , DUMMY_2_P2WPKH_SCRIPT )]
146
146
tx1b_hex = txToHex (tx1b )
147
147
148
148
# This will raise an exception due to insufficient fee
Original file line number Diff line number Diff line change @@ -445,15 +445,8 @@ def __coerce_instance(cls, other):
445
445
return other
446
446
447
447
def __add__ (self , other ):
448
- # Do the coercion outside of the try block so that errors in it are
449
- # noticed.
450
- other = self .__coerce_instance (other )
451
-
452
- try :
453
- # bytes.__add__ always returns bytes instances unfortunately
454
- return CScript (super (CScript , self ).__add__ (other ))
455
- except TypeError :
456
- raise TypeError ('Can not add a %r instance to a CScript' % other .__class__ )
448
+ # add makes no sense for a CScript()
449
+ raise NotImplementedError
457
450
458
451
def join (self , iterable ):
459
452
# join makes no sense for a CScript()
Original file line number Diff line number Diff line change 23
23
# scriptPubKeys are needed, to guarantee that the minimum transaction size is
24
24
# met.
25
25
DUMMY_P2WPKH_SCRIPT = CScript ([b'a' * 21 ])
26
+ DUMMY_2_P2WPKH_SCRIPT = CScript ([b'b' * 21 ])
You can’t perform that action at this time.
0 commit comments