Page MenuHomePhabricator

validation: Remove global ::VersionBitsTip{State,SinceHeight,Statistics}
ClosedPublic

Authored by PiRK on Mar 17 2022, 12:06.

Details

Summary

Tip: versionbitscache is currently a global so we didn't need to pass it in to any of ::VersionBitsTip*'s callers

Notes:

  • I had to restore versionbitscache in validation.h, removed in D2783.
  • VersionBitsBlockState was not used anywhere. It was introduced and used in D5282, then minerfund.cpp was deleted then added again but without using that function.

This is a backport of core#21055 [6/16]
https://github.com/bitcoin/bitcoin/pull/21055/commits/31eac50c721dd3b0bd2347e76196bf16913e9be9

Depends on D11210

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Mar 17 2022, 12:06

Tail of the build log:

/work /work/abc-ci-builds/lint-circular-dependencies
Good job! The circular dependency "minerfund -> validation -> minerfund" is no longer present.
Please remove it from EXPECTED_CIRCULAR_DEPENDENCIES in /work/test/lint/lint-circular-dependencies.sh
to make sure this circular dependency is not accidentally reintroduced.

/work/abc-ci-builds/lint-circular-dependencies
Build lint-circular-dependencies failed with exit code 1

remove solved circular dependeny from linter

This revision is now accepted and ready to land.Mar 17 2022, 13:33