refactor: inline constant return value of CDBWrapper::Write

This commit is contained in:
Lőrinc
2025-07-22 12:28:44 -07:00
parent d1847cf5b5
commit cdab9480e9
5 changed files with 26 additions and 26 deletions

View File

@@ -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)