diff --git a/src/dbwrapper.h b/src/dbwrapper.h index 50be26fb99e..c770df8e206 100644 --- a/src/dbwrapper.h +++ b/src/dbwrapper.h @@ -255,12 +255,11 @@ public: } template - bool Erase(const K& key, bool fSync = false) + void Erase(const K& key, bool fSync = false) { CDBBatch batch(*this); batch.Erase(key); WriteBatch(batch, fSync); - return true; } void WriteBatch(CDBBatch& batch, bool fSync = false); diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index 7371111ccbc..5a54baf2b5e 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -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); } } diff --git a/src/node/blockstorage.h b/src/node/blockstorage.h index cee0eb61ed6..7d6f78f2532 100644 --- a/src/node/blockstorage.h +++ b/src/node/blockstorage.h @@ -55,7 +55,7 @@ public: bool WriteBatchSync(const std::vector>& fileInfo, int nLastFile, const std::vector& blockinfo); bool ReadBlockFileInfo(int nFile, CBlockFileInfo& info); bool ReadLastBlockFile(int& nFile); - bool WriteReindexing(bool fReindexing); + void WriteReindexing(bool fReindexing); void ReadReindexing(bool& fReindexing); bool WriteFlag(const std::string& name, bool fValue); bool ReadFlag(const std::string& name, bool& fValue);