Unit tests for IsWitnessProgram #14737

issue domob1812 opened this issue on November 16, 2018
  1. domob1812 commented at 4:26 PM on November 16, 2018: contributor

    As far as I can tell, there are no unit tests (src/test) for CScript::IsWitnessProgram and other related functions (e.g. CScript::IsPayToWitnessScriptHash). There are unit tests for the very similar CScript::IsPayToScriptHash.

    Is there a particular reason why those tests are unnecessary / unwanted, or were they simply not considered important enough to warrant the time for being written?

    I'm currently working on some changes to those functions, which I would like to unit test. In case such tests are simply missing at the moment without being actually unwanted, I'd be happy to write unit tests also for the current version of the code and submit them as PR. If so, I guess an appropriate place would be a new script_segwit_tests.cpp file?

  2. fanquake added the label Tests on Nov 17, 2018
  3. domob1812 commented at 2:59 PM on November 18, 2018: contributor

    As there was no immediate objection / reason for not having such tests and I'm working on related code anyway, I went ahead and suggested #14752.

  4. MarcoFalke referenced this in commit 3617d22562 on Mar 16, 2022
  5. MarcoFalke closed this on Mar 16, 2022

  6. sidhujag referenced this in commit 934db4033b on Mar 16, 2022
  7. DrahtBot locked this on Mar 16, 2023

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