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

@@ -291,9 +291,7 @@ bool BlockFilterIndex::Write(const BlockFilter& filter, uint32_t block_height, c
value.second.header = filter_header;
value.second.pos = m_next_filter_pos;
if (!m_db->Write(DBHeightKey(block_height), value)) {
return false;
}
m_db->Write(DBHeightKey(block_height), value);
m_next_filter_pos.nPos += bytes_written;
return true;

View File

@@ -226,7 +226,8 @@ bool CoinStatsIndex::CustomAppend(const interfaces::BlockInfo& block)
// Intentionally do not update DB_MUHASH here so it stays in sync with
// DB_BEST_BLOCK, and the index is not corrupted if there is an unclean shutdown.
return m_db->Write(DBHeightKey(block.height), value);
m_db->Write(DBHeightKey(block.height), value);
return true;
}
[[nodiscard]] static bool CopyHeightIndexToHashIndex(CDBIterator& db_it, CDBBatch& batch,