[#CCoinsViewBacked]
= CCoinsViewBacked
:mrdocs:

CCoinsView backed by another CCoinsView

== Synopsis

Declared in `&lt;coins&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CCoinsViewBacked
    : public xref:CCoinsView.adoc[CCoinsView]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:CCoinsView.adoc[CCoinsView]`
| Pure abstract view on the open txout dataset&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CCoinsViewBacked/2constructor.adoc[`CCoinsViewBacked`]         [.small]#[constructor]#
| Construct a view backed by another view&period;
| xref:CCoinsViewBacked/BatchWrite.adoc[`BatchWrite`]  [.small]#[virtual]#
| Forward the bulk write to the backing view&period;
| xref:CCoinsViewBacked/EstimateSize.adoc[`EstimateSize`]  [.small]#[virtual]#
| Forward the size estimate to the backing view&period;
| xref:CCoinsViewBacked/GetBestBlock.adoc[`GetBestBlock`]  [.small]#[virtual]#
| Forward the best&hyphen;block query to the backing view&period;
| xref:CCoinsViewBacked/GetCoin.adoc[`GetCoin`]  [.small]#[virtual]#
| Forward the lookup to the backing view&period;
| xref:CCoinsViewBacked/GetHeadBlocks.adoc[`GetHeadBlocks`]  [.small]#[virtual]#
| Forward the head&hyphen;blocks query to the backing view&period;
| xref:CCoinsViewBacked/HaveCoin.adoc[`HaveCoin`]  [.small]#[virtual]#
| Forward the unspent check to the backing view&period;
| xref:CCoinsViewBacked/PeekCoin.adoc[`PeekCoin`]  [.small]#[virtual]#
| Forward the non&hyphen;caching lookup to the backing view&period;
| xref:CCoinsViewBacked/SetBackend.adoc[`SetBackend`] 
| Replace the backing view&period;
|===


== Protected Data Members

[cols="1,4"]
|===
| Name| Description
| xref:CCoinsViewBacked/base.adoc[`base`] 
| The underlying view that all calls are forwarded to&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:CCoinsViewCache.adoc[`CCoinsViewCache`] 
| CCoinsView that adds a memory cache for transactions to another CCoinsView
| xref:CCoinsViewErrorCatcher.adoc[`CCoinsViewErrorCatcher`] 
| This is a minimally invasive approach to shutdown on LevelDB read errors from the chainstate, while keeping user interface out of the common library, which is shared between bitcoind, and bitcoin&hyphen;qt and non&hyphen;server tools&period;
| xref:CCoinsViewMemPool.adoc[`CCoinsViewMemPool`] 
| CCoinsView that brings transactions from a mempool into view&period; It does not check for spendings by memory pool transactions&period; Instead, it provides access to all Coins which are either unspent in the base CCoinsView, are outputs from any mempool transaction, or are tracked temporarily to allow transaction dependencies in package validation&period; This allows transaction replacement to work as expected, as you want to have all inputs &quot;available&quot; to check signatures, and any cycles in the dependency graph are checked directly in AcceptToMemoryPool&period; It also allows you to sign a double&hyphen;spend directly in signrawtransactionwithkey and signrawtransactionwithwallet, as long as the conflicting transaction is not yet confirmed&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
