Skip to content

Commit b9f4b21

Browse files
committed
tests: Use MAX_SCRIPT_ELEMENT_SIZE from script.py
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.
1 parent e538a95 commit b9f4b21

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
@@ -46,6 +46,7 @@
4646
CScript,
4747
CScriptNum,
4848
CScriptOp,
49+
MAX_SCRIPT_ELEMENT_SIZE,
4950
OP_0,
5051
OP_1,
5152
OP_16,
@@ -1137,8 +1138,6 @@ def test_extra_witness_data(self):
11371138
def test_max_witness_push_length(self):
11381139
"""Test that witness stack can only allow up to 520 byte pushes."""
11391140

1140-
MAX_SCRIPT_ELEMENT_SIZE = 520
1141-
11421141
block = self.build_next_block()
11431142

11441143
witness_program = CScript([OP_DROP, OP_TRUE])

0 commit comments

Comments
 (0)