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):
1116
1116
MAX_PROGRAM_LENGTH = 10000
1117
1117
1118
1118
# 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 ])
1120
1120
assert len (long_witness_program ) == MAX_PROGRAM_LENGTH + 1
1121
1121
long_witness_hash = sha256 (long_witness_program )
1122
1122
long_script_pubkey = CScript ([OP_0 , long_witness_hash ])
@@ -1140,7 +1140,7 @@ def test_max_witness_program_length(self):
1140
1140
test_witness_block (self .nodes [0 ], self .test_node , block , accepted = False )
1141
1141
1142
1142
# 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 ])
1144
1144
assert len (witness_program ) == MAX_PROGRAM_LENGTH
1145
1145
witness_hash = sha256 (witness_program )
1146
1146
script_pubkey = CScript ([OP_0 , witness_hash ])
You can’t perform that action at this time.
0 commit comments