HomePhabricator

coinstats: Split node/coinstats.h to kernel/coinstats.h

Description

coinstats: Split node/coinstats.h to kernel/coinstats.h

Summary:
Most of this commit is pure-move. It also fixes a circular dependency and adjusts namespaces.

After this change:

  • kernel/coinstats.h -> Contains declarations for:
    • enum class CoinStatsHashType
    • struct CCoinsStats
    • GetBogoSize(...)
    • TxOutSer(...)
    • ComputeUTXOStats(...)
  • node/coinstats.h -> Just GetUTXOStats, which will be removed as we change callers to directly use the hashing/indexing codepaths in future commits.

This is a partial backport of core#24410
https://github.com/bitcoin/bitcoin/pull/24410/commits/80970985c965f79b8c376c8a922497e385445dd8
https://github.com/bitcoin/bitcoin/pull/24410/commits/0e54456f0498e52131f8ae0c76b4dfe25f45b076
https://github.com/bitcoin/bitcoin/pull/24410/commits/f329a9298c06ffe74b9e9fbc07bfe6d282fef9cb
https://github.com/bitcoin/bitcoin/pull/24410/commits/faa52387e8e4856445b1cfc9b5e072ce8f690f36
https://github.com/bitcoin/bitcoin/pull/24410/commits/f1006875665ffe8ff5da8185effe25b860743b4e (minor follow-up to D14673)

Test Plan:

cmake .. -GNinja -DBUILD_BITCOIN_CHAINSTATE=ON
ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Feb 16 2022, 22:51
PiRKCommitted on May 3 2024, 08:34
PiRKPushed on May 3 2024, 08:34
Reviewer
Restricted Project
Differential Revision
D16099: coinstats: Split node/coinstats.h to kernel/coinstats.h
Parents
rABCef67236e5cc0: coinstats: Move hasher codepath to kernel/coinstats
Branches
Unknown
Tags
Unknown