mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
refactor: inline constant return value of CDBWrapper::Write
This commit is contained in:
@@ -62,7 +62,8 @@ bool BlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo& info)
|
||||
bool BlockTreeDB::WriteReindexing(bool fReindexing)
|
||||
{
|
||||
if (fReindexing) {
|
||||
return Write(DB_REINDEX_FLAG, uint8_t{'1'});
|
||||
Write(DB_REINDEX_FLAG, uint8_t{'1'});
|
||||
return true;
|
||||
} else {
|
||||
return Erase(DB_REINDEX_FLAG);
|
||||
}
|
||||
@@ -94,7 +95,8 @@ bool BlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockFi
|
||||
|
||||
bool BlockTreeDB::WriteFlag(const std::string& name, bool fValue)
|
||||
{
|
||||
return Write(std::make_pair(DB_FLAG, name), fValue ? uint8_t{'1'} : uint8_t{'0'});
|
||||
Write(std::make_pair(DB_FLAG, name), fValue ? uint8_t{'1'} : uint8_t{'0'});
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BlockTreeDB::ReadFlag(const std::string& name, bool& fValue)
|
||||
|
||||
Reference in New Issue
Block a user