Move pblocktree global to BlockManager

This commit is contained in:
MarcoFalke
2021-07-01 10:24:58 +02:00
parent fa27f03b49
commit faa54e3757
7 changed files with 17 additions and 22 deletions

View File

@@ -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. */