Skip to content

Commit

Permalink
tests: Use MAX_SCRIPT_ELEMENT_SIZE from script.py
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
domob1812 committed Jul 11, 2018
1 parent e538a95 commit b9f4b21
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/functional/p2p_segwit.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
CScript,
CScriptNum,
CScriptOp,
MAX_SCRIPT_ELEMENT_SIZE,
OP_0,
OP_1,
OP_16,
Expand Down Expand Up @@ -1137,8 +1138,6 @@ def test_extra_witness_data(self):
def test_max_witness_push_length(self):
"""Test that witness stack can only allow up to 520 byte pushes."""

MAX_SCRIPT_ELEMENT_SIZE = 520

block = self.build_next_block()

witness_program = CScript([OP_DROP, OP_TRUE])
Expand Down

0 comments on commit b9f4b21

Please sign in to comment.