[#CCoinsViewDB] = CCoinsViewDB :mrdocs: CCoinsView backed by the coin database (chainstate/) == Synopsis Declared in `<txdb.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class CCoinsViewDB final : public xref:CCoinsView.adoc[CCoinsView] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:CCoinsView.adoc[CCoinsView]` | Pure abstract view on the open txout dataset. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:CCoinsViewDB/2constructor.adoc[`CCoinsViewDB`] [.small]#[constructor]# | Constructs the view, opening the coin database with the given parameters. | xref:CCoinsViewDB/2destructor.adoc[`~CCoinsViewDB`] [.small]#[destructor]# [.small]#[virtual]# | Destroys the view and releases the underlying database. | xref:CCoinsViewDB/BatchWrite.adoc[`BatchWrite`] [.small]#[virtual]# | Writes a batch of coin changes to the database. | xref:CCoinsViewDB/CompactFullAsync.adoc[`CompactFullAsync`] | Perform a full compaction of the underlying LevelDB on a one‐shot background thread. | xref:CCoinsViewDB/Cursor.adoc[`Cursor`] | Get a cursor to iterate over the whole state. | xref:CCoinsViewDB/EstimateSize.adoc[`EstimateSize`] [.small]#[virtual]# | Returns an estimate of the database size in bytes. | xref:CCoinsViewDB/GetBestBlock.adoc[`GetBestBlock`] [.small]#[virtual]# | Returns the hash of the best (tip) block recorded in the database. | xref:CCoinsViewDB/GetCoin.adoc[`GetCoin`] [.small]#[virtual]# | Returns the coin for an outpoint, if present. | xref:CCoinsViewDB/GetDBProperty.adoc[`GetDBProperty`] | Return an underlying LevelDB property value, if available. | xref:CCoinsViewDB/GetHeadBlocks.adoc[`GetHeadBlocks`] [.small]#[virtual]# | Returns the head block hashes recorded during an interrupted flush. | xref:CCoinsViewDB/HaveCoin.adoc[`HaveCoin`] [.small]#[virtual]# | Returns whether a coin exists for an outpoint. | xref:CCoinsViewDB/NeedsUpgrade.adoc[`NeedsUpgrade`] | Whether an unsupported database format is used. | xref:CCoinsViewDB/PeekCoin.adoc[`PeekCoin`] [.small]#[virtual]# | Returns the coin for an outpoint without caching the result. | xref:CCoinsViewDB/ResizeCache.adoc[`ResizeCache`] | Dynamically alter the underlying leveldb cache size. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:CCoinsViewDB/m_compaction.adoc[`m_compaction`] | Shared future tracking an in‐progress background compaction. | xref:CCoinsViewDB/m_db.adoc[`m_db`] | The underlying coin database wrapper. | xref:CCoinsViewDB/m_db_mutex.adoc[`m_db_mutex`] | Prevents CompactFull() from using m_db while ResizeCache() replaces it. | xref:CCoinsViewDB/m_db_params.adoc[`m_db_params`] | Parameters used to open the underlying database. | xref:CCoinsViewDB/m_options.adoc[`m_options`] | User‐controlled performance and debug options. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#