Page MenuHomePhabricator

Added test for CBlockIndexWorkComparator
ClosedPublic

Authored by jasonbcox on Jul 10 2018, 18:41.

Details

Summary

CBlockIndexWorkComparator is lacking tests. Required to fulfill testing requirements for D1442.

Depends on D1536.

Test Plan

make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
comp4
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2841
Build 3786: Bitcoin ABC Buildbot (legacy)
Build 3785: arc lint + arc unit

Event Timeline

Fix test so that it doesn't try to check equal nSequenceId when it's checking for inequality

deadalnix requested changes to this revision.Jul 12 2018, 11:48

There is no test for the block time accuracy.

src/test/work_comparator_tests.cpp
48 ↗(On Diff #4263)

This is undefined behavior.

This revision now requires changes to proceed.Jul 12 2018, 11:48

There is no test for the block time accuracy.

That will come as part of D1442.

Removed check on undefined behavior

Re-added the pointer case, but properly implemented.

This revision is now accepted and ready to land.Jul 14 2018, 12:30
This revision was automatically updated to reflect the committed changes.