test: add unit test for non-standard txs with too large scriptSig #17480

pull theStack wants to merge 1 commits into bitcoin:master from theStack:20191114-test-check-for-non-standard-txs-with-too-large-scriptsig changing 1 files +13 −0
  1. theStack commented at 6:42 pm on November 14, 2019: member
    Approaches the first missing test of issue #17394: Checks that the function IsStandardTx() returns rejection reason "scriptsig-size" if any one the inputs’ scriptSig is larger than 1650 bytes.
  2. fanquake added the label Tests on Nov 14, 2019
  3. fanquake requested review from instagibbs on Nov 14, 2019
  4. in src/test/transaction_tests.cpp:790 in 35d87ed45b outdated
    783@@ -784,6 +784,19 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
    784     reason.clear();
    785     BOOST_CHECK(!IsStandardTx(CTransaction(t), reason));
    786     BOOST_CHECK_EQUAL(reason, "multi-op-return");
    787+
    788+    // Check large scriptSig (non-standard if size is >1650 bytes)
    789+    t.vout.resize(1);
    790+    t.vout[0].nValue = 90*CENT;
    


    instagibbs commented at 6:45 pm on November 14, 2019:
    this value seems like a magic number unrelated to the actual test. Could just make it MAX_MONEY since we don’t want to make it dusty.

    theStack commented at 6:52 pm on November 14, 2019:
    Sure, done.
  5. instagibbs approved
  6. test: add unit test for non-standard txs with too large scriptSig
    The function IsStandardTx() returns rejection reason "scriptsig-size" if any
    one the inputs' scriptSig is larger than 1650 bytes.
    5e8a56348b
  7. theStack force-pushed on Nov 14, 2019
  8. DrahtBot commented at 7:14 pm on November 14, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #17272 ([POLICY] Make multiple OP_RETURNS in a single TX standard by Bushstar)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  9. MarcoFalke commented at 7:17 pm on November 14, 2019: member
    ACK 5e8a56348b5e1026e9ddcae0b2fa2a68faf4439e
  10. fanquake requested review from instagibbs on Nov 15, 2019
  11. MarcoFalke referenced this in commit f92e750eb4 on Nov 15, 2019
  12. MarcoFalke merged this on Nov 15, 2019
  13. MarcoFalke closed this on Nov 15, 2019

  14. fanquake referenced this in commit 3671c5721d on Nov 20, 2019
  15. sidhujag referenced this in commit f6fb810bdc on Nov 20, 2019
  16. jasonbcox referenced this in commit 8e494479e3 on Nov 5, 2020
  17. sidhujag referenced this in commit 71802a6d21 on Nov 10, 2020
  18. theStack deleted the branch on Dec 1, 2020
  19. PastaPastaPasta referenced this in commit 950e91d5c0 on Jun 27, 2021
  20. PastaPastaPasta referenced this in commit db3d2dd0af on Jun 28, 2021
  21. PastaPastaPasta referenced this in commit 5466402f68 on Jun 29, 2021
  22. PastaPastaPasta referenced this in commit b1d9c8fe2d on Jul 1, 2021
  23. PastaPastaPasta referenced this in commit 8e8bb36231 on Jul 1, 2021
  24. PastaPastaPasta referenced this in commit 39de93769f on Jul 14, 2021
  25. PastaPastaPasta referenced this in commit 0cb5bf6336 on Jul 14, 2021
  26. PastaPastaPasta referenced this in commit 89af1a9f1e on Jul 15, 2021
  27. DrahtBot locked this on Feb 15, 2022

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: 2024-10-30 03:12 UTC

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