mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
refactor: inline constant return value of CDBWrapper::Erase and BlockTreeDB::WriteReindexing
Did both in this commit, since the return value of `WriteReindexing` was ignored anyway - which existed only because of the constant `Erase` being called
This commit is contained in:
@@ -59,13 +59,12 @@ bool BlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo& info)
|
||||
return Read(std::make_pair(DB_BLOCK_FILES, nFile), info);
|
||||
}
|
||||
|
||||
bool BlockTreeDB::WriteReindexing(bool fReindexing)
|
||||
void BlockTreeDB::WriteReindexing(bool fReindexing)
|
||||
{
|
||||
if (fReindexing) {
|
||||
Write(DB_REINDEX_FLAG, uint8_t{'1'});
|
||||
return true;
|
||||
} else {
|
||||
return Erase(DB_REINDEX_FLAG);
|
||||
Erase(DB_REINDEX_FLAG);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user