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

Details

Provenance
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Authored on Feb 2 2019, 15:32
markblundebergPushed on Feb 2 2019, 16:17
Reviewer
Restricted Project
Differential Revision
D2482: fix ineffective checkdatasig_tests
Parents
rABC2ab7a2604d4a: radix_tests : use lcg.h module
Branches
Unknown
Tags
Unknown

Event Timeline

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