mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-14 17:48:01 +02:00
refactor: inline constant return value of BlockTreeDB::WriteBatchSync and BlockManager::WriteBlockIndexDB and BlockTreeDB::WriteFlag
This commit is contained in:
@@ -52,12 +52,12 @@ class BlockTreeDB : 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);
|
||||
void 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);
|
||||
void WriteReindexing(bool fReindexing);
|
||||
void ReadReindexing(bool& fReindexing);
|
||||
bool WriteFlag(const std::string& name, bool fValue);
|
||||
void 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);
|
||||
@@ -300,7 +300,7 @@ public:
|
||||
|
||||
std::unique_ptr<BlockTreeDB> m_block_tree_db GUARDED_BY(::cs_main);
|
||||
|
||||
bool WriteBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
void WriteBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
bool LoadBlockIndexDB(const std::optional<uint256>& snapshot_blockhash)
|
||||
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user