[#CChain]
= CChain
:mrdocs:

An in&hyphen;memory indexed chain of blocks&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CChain;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CChain/2constructor-0f.adoc[`CChain`]         [.small]#[constructor]#
| Constructors
| xref:CChain/operator_assign.adoc[`operator&equals;`]  [.small]#[deleted]#
| Copy assignment is deleted&semi; chains are not copyable&period;
| xref:CChain/Contains.adoc[`Contains`] 
| Efficiently check whether a block is present in this chain&period;
| xref:CChain/FindEarliestAtLeast.adoc[`FindEarliestAtLeast`] 
| Find the earliest block with timestamp equal or greater than the given time and height equal or greater than the given height&period;
| xref:CChain/FindFork.adoc[`FindFork`] 
| Find the last common block between this chain and a block index entry&period;
| xref:CChain/Genesis.adoc[`Genesis`] 
| Returns the index entry for the genesis block of this chain, or nullptr if none&period;
| xref:CChain/Height.adoc[`Height`] 
| Return the maximal height in the chain&period; Is equal to chain&period;Tip() ? chain&period;Tip()&hyphen;&gt;nHeight &colon; &hyphen;1&period;
| xref:CChain/IsTipRecent.adoc[`IsTipRecent`] 
| Check whether this chain&apos;s tip exists, has enough work, and is recent&period;
| xref:CChain/Next.adoc[`Next`] 
| Find the successor of a block in this chain, or nullptr if the given index is not found or is the tip&period;
| xref:CChain/SetTip.adoc[`SetTip`] 
| Set&sol;initialize a chain with a given tip&period;
| xref:CChain/Tip.adoc[`Tip`] 
| Returns the index entry for the tip of this chain, or nullptr if none&period;
| xref:CChain/operator_subs.adoc[`operator&lsqb;&rsqb;`] 
| Returns the index entry at a particular height in this chain, or nullptr if no such height exists&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:TestLockPointValidity.adoc[`TestLockPointValidity`]
| Test whether the LockPoints height and time are still valid on the current chain
|===


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