mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 10:42:13 +02:00
refactor: inline constant return value of CDBWrapper::Write
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user