Skip to content

Commit 6fcdb5e

Browse files
committed
Merge #13638: tests: Use MAX_SCRIPT_ELEMENT_SIZE from script.py
b9f4b21 tests: Use MAX_SCRIPT_ELEMENT_SIZE from script.py (Daniel Kraft) Pull request description: `p2p_segwit.py` and `test_framework/script.py` both define a constant for `MAX_SCRIPT_ELEMENT_SIZE` (=520 bytes), which is redundant. This change uses the constant defined in the `script.py` module for `p2p_segwit.py`. Tree-SHA512: 2bc295ff26d9b052d4e05b85c27e748175884d6689a92c19337fc4db8bf439e3abe3edc91af1aaf46d8dc42ed96a85ad17110546d2274a0d9cda3abd6b878a31
2 parents 30640f8 + b9f4b21 commit 6fcdb5e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/functional/p2p_segwit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
CScript,
4848
CScriptNum,
4949
CScriptOp,
50+
MAX_SCRIPT_ELEMENT_SIZE,
5051
OP_0,
5152
OP_1,
5253
OP_16,
@@ -1129,8 +1130,6 @@ def test_extra_witness_data(self):
11291130
def test_max_witness_push_length(self):
11301131
"""Test that witness stack can only allow up to 520 byte pushes."""
11311132

1132-
MAX_SCRIPT_ELEMENT_SIZE = 520
1133-
11341133
block = self.build_next_block()
11351134

11361135
witness_program = CScript([OP_DROP, OP_TRUE])

0 commit comments

Comments
 (0)