diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-08-01 12:01:02 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-08-01 15:27:33 +0200 |
commit | fa65111b99627289fd47dcfaa5197e0f09b8a50e (patch) | |
tree | aa759777b4149a547979da18d655d994d70c75e9 /src/txdb.h | |
parent | fa8685597e7302fc136f21b6dd3a4b187fa8e251 (diff) |
move-only: Move CBlockTreeDB to node/blockstorage
The block index (CBlockTreeDB) is required to write and read blocks, so
move it to blockstorage. This allows to drop the txdb.h include from
`node/blockstorage.h`.
Can be reviewed with:
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
Diffstat (limited to 'src/txdb.h')
-rw-r--r-- | src/txdb.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/txdb.h b/src/txdb.h index d773f01b50..c9af0a091e 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -14,23 +14,12 @@ #include <cstddef> #include <cstdint> -#include <functional> #include <memory> #include <optional> -#include <string> -#include <utility> #include <vector> -class CBlockFileInfo; -class CBlockIndex; class COutPoint; class uint256; -namespace Consensus { -struct Params; -}; -namespace util { -class SignalInterrupt; -} // namespace util //! -dbcache default (MiB) static const int64_t nDefaultDbCache = 450; @@ -88,20 +77,4 @@ public: std::optional<fs::path> StoragePath() { return m_db->StoragePath(); } }; -/** Access to the block database (blocks/index/) */ -class CBlockTreeDB : public CDBWrapper -{ -public: - using CDBWrapper::CDBWrapper; - bool WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo); - bool ReadBlockFileInfo(int nFile, CBlockFileInfo &info); - bool ReadLastBlockFile(int &nFile); - bool WriteReindexing(bool fReindexing); - void ReadReindexing(bool &fReindexing); - bool WriteFlag(const std::string &name, bool fValue); - bool ReadFlag(const std::string &name, bool &fValue); - bool LoadBlockIndexGuts(const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex, const util::SignalInterrupt& interrupt) - EXCLUSIVE_LOCKS_REQUIRED(::cs_main); -}; - #endif // BITCOIN_TXDB_H |