HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Sep 15 2020, 20:16
PiRKCommitted on Mar 17 2022, 14:16
PiRKPushed on Mar 17 2022, 14:16
Reviewer
Restricted Project
Differential Revision
D11211: validation: Remove global ::VersionBitsTip{State,SinceHeight,Statistics}
Parents
rABCd86cfa528897: validation: Pass in chainstate to ::PruneBlockFilesManual
Branches
Unknown
Tags
Unknown