tests: Use MAX_SCRIPT_ELEMENT_SIZE from script.py #13638

pull domob1812 wants to merge 1 commits into bitcoin:master from domob1812:script-element-size changing 1 files +1 −2
  1. domob1812 commented at 4:20 PM on July 11, 2018: contributor

    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.

  2. 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.
    b9f4b211df
  3. MarcoFalke added the label Refactoring on Jul 11, 2018
  4. MarcoFalke added the label Tests on Jul 11, 2018
  5. domob1812 commented at 5:08 PM on July 11, 2018: contributor

    Note that there are two more places in p2p_segwit.py that use the literal constant 520 - but they just use the max script element size to build up large scripts for testing size limits. So there the number is not used explicitly as the "max script element size" so I left it untouched (especially since there some precise calculations of byte sizes are used, so the exact number matters).

  6. practicalswift commented at 2:06 PM on July 12, 2018: contributor

    Concept ACK

  7. fanquake requested review from MarcoFalke on Jul 15, 2018
  8. MarcoFalke commented at 3:55 PM on July 15, 2018: member

    utACK b9f4b211df24fed85dddbe69355648b57fd331ac

  9. laanwj merged this on Jul 17, 2018
  10. laanwj closed this on Jul 17, 2018

  11. laanwj referenced this in commit 6fcdb5ebdd on Jul 17, 2018
  12. domob1812 deleted the branch on Jul 17, 2018
  13. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me