File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1116,7 +1116,7 @@ def test_max_witness_program_length(self):
11161116 MAX_PROGRAM_LENGTH = 10000
11171117
11181118 # This program is 19 max pushes (9937 bytes), then 64 more opcode-bytes.
1119- long_witness_program = CScript ([b'a' * 520 ] * 19 + [OP_DROP ] * 63 + [OP_TRUE ])
1119+ long_witness_program = CScript ([b'a' * MAX_SCRIPT_ELEMENT_SIZE ] * 19 + [OP_DROP ] * 63 + [OP_TRUE ])
11201120 assert len (long_witness_program ) == MAX_PROGRAM_LENGTH + 1
11211121 long_witness_hash = sha256 (long_witness_program )
11221122 long_script_pubkey = CScript ([OP_0 , long_witness_hash ])
@@ -1140,7 +1140,7 @@ def test_max_witness_program_length(self):
11401140 test_witness_block (self .nodes [0 ], self .test_node , block , accepted = False )
11411141
11421142 # Try again with one less byte in the witness program
1143- witness_program = CScript ([b'a' * 520 ] * 19 + [OP_DROP ] * 62 + [OP_TRUE ])
1143+ witness_program = CScript ([b'a' * MAX_SCRIPT_ELEMENT_SIZE ] * 19 + [OP_DROP ] * 62 + [OP_TRUE ])
11441144 assert len (witness_program ) == MAX_PROGRAM_LENGTH
11451145 witness_hash = sha256 (witness_program )
11461146 script_pubkey = CScript ([OP_0 , witness_hash ])
You can’t perform that action at this time.
0 commit comments