HomePhabricator

fix ineffective checkdatasig_tests

Description

fix ineffective checkdatasig_tests

Summary:
These tests were totally broken:

  • Only did 1 iteration because it set flags |= ENABLE_CHECKDATASIG at start
  • Wasn't aware of SCRIPT_VERIFY_COMPRESSED_PUBKEYTYPE
  • Missed some SCRIPT_VERIFY_NULLFAIL cases

Also I changed it to use pseudorandom flags generator since the original intent of 262000 iterations would have been way way too slow anyway. Runtime is now ~3 sec, would have been 3 minutes (dominating test_bitcoin runtime) if original iter count ever actually worked.

Test Plan: test_bitcoin

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2482

Event Timeline

Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com> committed rSTAGING6bcf11b84499: fix ineffective checkdatasig_tests (authored by Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>).Feb 2 2019, 16:17