aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-07-01 10:24:58 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-07-15 13:54:09 +0200
commitfaa54e375782b21cbc2761c763128131c569e903 (patch)
treee85e2453bcf35354ad3e672d8411f3a2c6ea9c3e /src/validation.h
parentfa27f03b4943540aa2eab283d4cf50ad4a1a01f8 (diff)
downloadbitcoin-faa54e375782b21cbc2761c763128131c569e903.tar.xz
Move pblocktree global to BlockManager
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/validation.h b/src/validation.h
index 3d2d51f262..18a09d4aa3 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -446,6 +446,8 @@ public:
*/
std::multimap<CBlockIndex*, CBlockIndex*> m_blocks_unlinked;
+ std::unique_ptr<CBlockTreeDB> m_block_tree_db GUARDED_BY(::cs_main);
+
bool LoadBlockIndexDB(std::set<CBlockIndex*, CBlockIndexWorkComparator>& setBlockIndexCandidates) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
/**
@@ -458,7 +460,6 @@ public:
*/
bool LoadBlockIndex(
const Consensus::Params& consensus_params,
- CBlockTreeDB& blocktree,
std::set<CBlockIndex*, CBlockIndexWorkComparator>& block_index_candidates)
EXCLUSIVE_LOCKS_REQUIRED(cs_main);
@@ -1047,9 +1048,6 @@ public:
}
};
-/** Global variable that points to the active block tree (protected by cs_main) */
-extern std::unique_ptr<CBlockTreeDB> pblocktree;
-
using FopenFn = std::function<FILE*(const fs::path&, const char*)>;
/** Dump the mempool to disk. */