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.
This commit is contained in:
parent
e538a952d5
commit
b9f4b211df
1 changed files with 1 additions and 2 deletions
|
@ -46,6 +46,7 @@ from test_framework.script import (
|
||||||
CScript,
|
CScript,
|
||||||
CScriptNum,
|
CScriptNum,
|
||||||
CScriptOp,
|
CScriptOp,
|
||||||
|
MAX_SCRIPT_ELEMENT_SIZE,
|
||||||
OP_0,
|
OP_0,
|
||||||
OP_1,
|
OP_1,
|
||||||
OP_16,
|
OP_16,
|
||||||
|
@ -1137,8 +1138,6 @@ class SegWitTest(BitcoinTestFramework):
|
||||||
def test_max_witness_push_length(self):
|
def test_max_witness_push_length(self):
|
||||||
"""Test that witness stack can only allow up to 520 byte pushes."""
|
"""Test that witness stack can only allow up to 520 byte pushes."""
|
||||||
|
|
||||||
MAX_SCRIPT_ELEMENT_SIZE = 520
|
|
||||||
|
|
||||||
block = self.build_next_block()
|
block = self.build_next_block()
|
||||||
|
|
||||||
witness_program = CScript([OP_DROP, OP_TRUE])
|
witness_program = CScript([OP_DROP, OP_TRUE])
|
||||||
|
|
Loading…
Add table
Reference in a new issue