Page MenuHomePhabricator

fix ineffective checkdatasig_tests
ClosedPublic

Authored by markblundeberg on Feb 2 2019, 15:37.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix_cds_tests
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4838
Build 7739: Bitcoin ABC Buildbot (legacy)
Build 7738: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Feb 2 2019, 15:43

Some minor changes, but overall LGTM.

src/test/checkdatasig_tests.cpp
48 ↗(On Diff #7121)

Keep the check equal.

50 ↗(On Diff #7121)

Do not try to format tthese is specific format, especially not with colors.

63 ↗(On Diff #7121)

dito

This revision now requires changes to proceed.Feb 2 2019, 15:43
markblundeberg marked 2 inline comments as done.

remove custom messaging

This revision is now accepted and ready to land.Feb 2 2019, 16:06