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.
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-
theStack commented at 6:42 PM on November 14, 2019: member
- fanquake added the label Tests on Nov 14, 2019
- fanquake requested review from instagibbs on Nov 14, 2019
-
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.
instagibbs approved5e8a56348btest: 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.
theStack force-pushed on Nov 14, 2019DrahtBot commented at 7:14 PM on November 14, 2019: member<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
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.
MarcoFalke commented at 7:17 PM on November 14, 2019: memberACK 5e8a56348b5e1026e9ddcae0b2fa2a68faf4439e
fanquake requested review from instagibbs on Nov 15, 2019instagibbs commented at 3:30 PM on November 15, 2019: memberMarcoFalke referenced this in commit f92e750eb4 on Nov 15, 2019MarcoFalke merged this on Nov 15, 2019MarcoFalke closed this on Nov 15, 2019fanquake referenced this in commit 3671c5721d on Nov 20, 2019sidhujag referenced this in commit f6fb810bdc on Nov 20, 2019jasonbcox referenced this in commit 8e494479e3 on Nov 5, 2020sidhujag referenced this in commit 71802a6d21 on Nov 10, 2020theStack deleted the branch on Dec 1, 2020PastaPastaPasta referenced this in commit 950e91d5c0 on Jun 27, 2021PastaPastaPasta referenced this in commit db3d2dd0af on Jun 28, 2021PastaPastaPasta referenced this in commit 5466402f68 on Jun 29, 2021PastaPastaPasta referenced this in commit b1d9c8fe2d on Jul 1, 2021PastaPastaPasta referenced this in commit 8e8bb36231 on Jul 1, 2021PastaPastaPasta referenced this in commit 39de93769f on Jul 14, 2021PastaPastaPasta referenced this in commit 0cb5bf6336 on Jul 14, 2021PastaPastaPasta referenced this in commit 89af1a9f1e on Jul 15, 2021DrahtBot locked this on Feb 15, 2022ContributorsLabels
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-30 21:14 UTC
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-30 21:14 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me