mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 17:56:16 +00:00
473 lines
33 KiB
HTML
473 lines
33 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.14"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Dash Core: CChain Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(initResizable);
|
|
/* @license-end */</script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="bitcoin_logo_doxygen.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Dash Core
|
|
 <span id="projectnumber">0.12.2.1</span>
|
|
</div>
|
|
<div id="projectbrief">P2P Digital Currency</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.14 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('classCChain.html','');});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pri-attribs">Private Attributes</a> |
|
|
<a href="#friends">Friends</a> |
|
|
<a href="classCChain-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">CChain Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p><code>#include <<a class="el" href="chain_8h_source.html">chain.h</a>></code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a0af94042e68f7dbc86260d3a54f08a3f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#a0af94042e68f7dbc86260d3a54f08a3f">Genesis</a> () const</td></tr>
|
|
<tr class="separator:a0af94042e68f7dbc86260d3a54f08a3f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a578545bde95163bee37b1be28e7b2755"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#a578545bde95163bee37b1be28e7b2755">Tip</a> () const</td></tr>
|
|
<tr class="separator:a578545bde95163bee37b1be28e7b2755"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a13c4493c833ffb8d1725fde05e42b28a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#a13c4493c833ffb8d1725fde05e42b28a">operator[]</a> (int nHeight) const</td></tr>
|
|
<tr class="separator:a13c4493c833ffb8d1725fde05e42b28a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af1786dc229c215dea7f727c11df2c8dc"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#af1786dc229c215dea7f727c11df2c8dc">Contains</a> (const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> *pindex) const</td></tr>
|
|
<tr class="separator:af1786dc229c215dea7f727c11df2c8dc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3077e83c87e8a974765fa76a57fd040b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#a3077e83c87e8a974765fa76a57fd040b">Next</a> (const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> *pindex) const</td></tr>
|
|
<tr class="separator:a3077e83c87e8a974765fa76a57fd040b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad4758bc8872ce065a9579f77c3171d40"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#ad4758bc8872ce065a9579f77c3171d40">Height</a> () const</td></tr>
|
|
<tr class="separator:ad4758bc8872ce065a9579f77c3171d40"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeb563751f7362d4308c7c2cb35b834a5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#aeb563751f7362d4308c7c2cb35b834a5">SetTip</a> (<a class="el" href="classCBlockIndex.html">CBlockIndex</a> *pindex)</td></tr>
|
|
<tr class="separator:aeb563751f7362d4308c7c2cb35b834a5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a03e98bebe804bfba219b4e6a2b858d9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structCBlockLocator.html">CBlockLocator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#a03e98bebe804bfba219b4e6a2b858d9f">GetLocator</a> (const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> *pindex=NULL) const</td></tr>
|
|
<tr class="separator:a03e98bebe804bfba219b4e6a2b858d9f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adb9ec01329511e869bba95e3c143da71"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#adb9ec01329511e869bba95e3c143da71">FindFork</a> (const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> *pindex) const</td></tr>
|
|
<tr class="separator:adb9ec01329511e869bba95e3c143da71"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
|
|
Private Attributes</h2></td></tr>
|
|
<tr class="memitem:adc8fa3eb698fb5985c7b39daf6bbf708"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="classCBlockIndex.html">CBlockIndex</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#adc8fa3eb698fb5985c7b39daf6bbf708">vChain</a></td></tr>
|
|
<tr class="separator:adc8fa3eb698fb5985c7b39daf6bbf708"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
|
|
Friends</h2></td></tr>
|
|
<tr class="memitem:a0e46ed4192afeafb8d420b2d6d9bb24c"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCChain.html#a0e46ed4192afeafb8d420b2d6d9bb24c">operator==</a> (const <a class="el" href="classCChain.html">CChain</a> &a, const <a class="el" href="classCChain.html">CChain</a> &b)</td></tr>
|
|
<tr class="separator:a0e46ed4192afeafb8d420b2d6d9bb24c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>An in-memory indexed chain of blocks. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8h_source.html#l00355">355</a> of file <a class="el" href="chain_8h_source.html">chain.h</a>.</p>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="af1786dc229c215dea7f727c11df2c8dc"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af1786dc229c215dea7f727c11df2c8dc">◆ </a></span>Contains()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool CChain::Contains </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td>
|
|
<td class="paramname"><em>pindex</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Efficiently check whether a block is present in this chain. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8h_source.html#l00384">384</a> of file <a class="el" href="chain_8h_source.html">chain.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="blockchain_8cpp_source.html#l00063">blockheaderToJSON()</a>, <a class="el" href="blockchain_8cpp_source.html#l00090">blockToJSON()</a>, <a class="el" href="validation_8cpp_source.html#l00172">FindForkInGlobalIndex()</a>, <a class="el" href="validation_8cpp_source.html#l02639">FindMostWorkChain()</a>, <a class="el" href="blockchain_8cpp_source.html#l00837">getchaintips()</a>, <a class="el" href="wallet_8cpp_source.html#l04416">CMerkleTx::GetDepthInMainChain()</a>, <a class="el" href="wallet_8cpp_source.html#l04273">CWallet::GetKeyBirthTimes()</a>, <a class="el" href="validation_8cpp_source.html#l02863">InvalidateBlock()</a>, <a class="el" href="governance-object_8cpp_source.html#l00502">CGovernanceObject::IsCollateralValid()</a>, <a class="el" href="wallet_8cpp_source.html#l01127">CWallet::MarkConflicted()</a>, <a class="el" href="chain_8h_source.html#l00389">Next()</a>, <a class="el" href="net__processing_8cpp_source.html#l00785">ProcessGetData()</a>, <a class="el" href="net__processing_8cpp_source.html#l01074">ProcessMessage()</a>, <a class="el" href="rest_8cpp_source.html#l00129">rest_headers()</a>, <a class="el" href="wallet_8cpp_source.html#l04386">CMerkleTx::SetMerkleBranch()</a>, <a class="el" href="validation_8cpp_source.html#l00328">TestLockPointValidity()</a>, <a class="el" href="rawtransaction_8cpp_source.html#l00064">TxToJSON()</a>, and <a class="el" href="rawtransaction_8cpp_source.html#l00321">verifytxoutproof()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adb9ec01329511e869bba95e3c143da71"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adb9ec01329511e869bba95e3c143da71">◆ </a></span>FindFork()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> * CChain::FindFork </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td>
|
|
<td class="paramname"><em>pindex</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Find the last common block between this chain and a block index entry. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8cpp_source.html#l00053">53</a> of file <a class="el" href="chain_8cpp_source.html">chain.cpp</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="validation_8cpp_source.html#l02808">ActivateBestChain()</a>, <a class="el" href="validation_8cpp_source.html#l02709">ActivateBestChainStep()</a>, and <a class="el" href="blockchain_8cpp_source.html#l00837">getchaintips()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a0af94042e68f7dbc86260d3a54f08a3f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0af94042e68f7dbc86260d3a54f08a3f">◆ </a></span>Genesis()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classCBlockIndex.html">CBlockIndex</a>* CChain::Genesis </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Returns the index entry for the genesis block of this chain, or NULL if none. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8h_source.html#l00361">361</a> of file <a class="el" href="chain_8h_source.html">chain.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="init_8cpp_source.html#l00942">AppInit2()</a>, <a class="el" href="validation_8cpp_source.html#l04124">CheckBlockIndex()</a>, <a class="el" href="validation_8cpp_source.html#l00172">FindForkInGlobalIndex()</a>, <a class="el" href="rpcdump_8cpp_source.html#l00181">importaddress()</a>, <a class="el" href="rpcdump_8cpp_source.html#l00076">importprivkey()</a>, <a class="el" href="rpcdump_8cpp_source.html#l00247">importpubkey()</a>, and <a class="el" href="validation_8cpp_source.html#l03956">InitBlockIndex()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a03e98bebe804bfba219b4e6a2b858d9f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a03e98bebe804bfba219b4e6a2b858d9f">◆ </a></span>GetLocator()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structCBlockLocator.html">CBlockLocator</a> CChain::GetLocator </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td>
|
|
<td class="paramname"><em>pindex</em> = <code>NULL</code></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Return a <a class="el" href="structCBlockLocator.html">CBlockLocator</a> that refers to a block in this chain (by default the tip). </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8cpp_source.html#l00025">25</a> of file <a class="el" href="chain_8cpp_source.html">chain.cpp</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="init_8cpp_source.html#l00942">AppInit2()</a>, <a class="el" href="validation_8cpp_source.html#l02311">FlushStateToDisk()</a>, <a class="el" href="net__processing_8cpp_source.html#l01074">ProcessMessage()</a>, and <a class="el" href="net__processing_8cpp_source.html#l02296">SendMessages()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad4758bc8872ce065a9579f77c3171d40"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad4758bc8872ce065a9579f77c3171d40">◆ </a></span>Height()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int CChain::Height </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Return the maximal height in the chain. Is equal to chain.Tip() ? chain.Tip()->nHeight : -1. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8h_source.html#l00397">397</a> of file <a class="el" href="chain_8h_source.html">chain.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="validation_8cpp_source.html#l03400">AcceptBlock()</a>, <a class="el" href="validation_8cpp_source.html#l00549">AcceptToMemoryPoolWorker()</a>, <a class="el" href="init_8cpp_source.html#l00942">AppInit2()</a>, <a class="el" href="blockchain_8cpp_source.html#l00063">blockheaderToJSON()</a>, <a class="el" href="blockchain_8cpp_source.html#l00090">blockToJSON()</a>, <a class="el" href="masternode_8cpp_source.html#l00139">CMasternode::Check()</a>, <a class="el" href="masternode_8cpp_source.html#l00743">CMasternodePing::CheckAndUpdate()</a>, <a class="el" href="validation_8cpp_source.html#l04124">CheckBlockIndex()</a>, <a class="el" href="validation_8cpp_source.html#l00213">CheckFinalTx()</a>, <a class="el" href="validation_8cpp_source.html#l01320">CheckForkWarningConditions()</a>, <a class="el" href="validation_8cpp_source.html#l01368">CheckForkWarningConditionsOnNewFork()</a>, <a class="el" href="masternode_8cpp_source.html#l00543">CMasternodeBroadcast::CheckOutpoint()</a>, <a class="el" href="masternode_8cpp_source.html#l00671">CMasternodePing::CMasternodePing()</a>, <a class="el" href="wallet_8cpp_source.html#l03173">CWallet::CreateTransaction()</a>, <a class="el" href="rpcdump_8cpp_source.html#l00629">dumpwallet()</a>, <a class="el" href="transactiondesc_8cpp_source.html#l00027">TransactionDesc::FormatTxStatus()</a>, <a class="el" href="mining_8cpp_source.html#l00122">generate()</a>, <a class="el" href="blockchain_8cpp_source.html#l00743">getblockchaininfo()</a>, <a class="el" href="blockchain_8cpp_source.html#l00131">getblockcount()</a>, <a class="el" href="blockchain_8cpp_source.html#l00311">getblockhash()</a>, <a class="el" href="validation_8cpp_source.html#l01911">GetBlockHash()</a>, <a class="el" href="wallet_8cpp_source.html#l04416">CMerkleTx::GetDepthInMainChain()</a>, <a class="el" href="rpc_2governance_8cpp_source.html#l00897">getgovernanceinfo()</a>, <a class="el" href="misc_8cpp_source.html#l00047">getinfo()</a>, <a class="el" href="wallet_8cpp_source.html#l04273">CWallet::GetKeyBirthTimes()</a>, <a class="el" href="mining_8cpp_source.html#l00235">getmininginfo()</a>, <a class="el" href="mining_8cpp_source.html#l00044">GetNetworkHashPS()</a>, <a class="el" href="clientmodel_8cpp_source.html#l00094">ClientModel::getNumBlocks()</a>, <a class="el" href="rawtransaction_8cpp_source.html#l00235">gettxoutproof()</a>, <a class="el" href="validation_8cpp_source.html#l00461">GetUTXOConfirmations()</a>, <a class="el" href="rpcdump_8cpp_source.html#l00412">importelectrumwallet()</a>, <a class="el" href="rpcdump_8cpp_source.html#l00305">importwallet()</a>, <a class="el" href="validation_8cpp_source.html#l01401">InvalidChainFound()</a>, <a class="el" href="governance-object_8cpp_source.html#l00502">CGovernanceObject::IsCollateralValid()</a>, <a class="el" href="instantx_8cpp_source.html#l00922">CTxLockRequest::IsValid()</a>, <a class="el" href="rpcwallet_8cpp_source.html#l01726">listsinceblock()</a>, <a class="el" href="validation_8cpp_source.html#l03709">LoadBlockIndexDB()</a>, <a class="el" href="wallet_8cpp_source.html#l01127">CWallet::MarkConflicted()</a>, <a class="el" href="blockchain_8cpp_source.html#l00182">mempoolToJSON()</a>, <a class="el" href="walletmodel_8cpp_source.html#l00134">WalletModel::pollBalanceChanged()</a>, <a class="el" href="spork_8cpp_source.html#l00020">CSporkManager::ProcessSpork()</a>, <a class="el" href="rest_8cpp_source.html#l00403">rest_getutxos()</a>, <a class="el" href="wallet_8cpp_source.html#l04386">CMerkleTx::SetMerkleBranch()</a>, <a class="el" href="transactionrecord_8cpp_source.html#l00319">TransactionRecord::statusUpdateNeeded()</a>, <a class="el" href="rawtransaction_8cpp_source.html#l00064">TxToJSON()</a>, <a class="el" href="transactionrecord_8cpp_source.html#l00231">TransactionRecord::updateStatus()</a>, <a class="el" href="validation_8cpp_source.html#l02420">UpdateTip()</a>, and <a class="el" href="validation_8cpp_source.html#l03841">CVerifyDB::VerifyDB()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a3077e83c87e8a974765fa76a57fd040b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3077e83c87e8a974765fa76a57fd040b">◆ </a></span>Next()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classCBlockIndex.html">CBlockIndex</a>* CChain::Next </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td>
|
|
<td class="paramname"><em>pindex</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Find the successor of a block in this chain, or NULL if the given index is not found or is the tip. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8h_source.html#l00389">389</a> of file <a class="el" href="chain_8h_source.html">chain.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="blockchain_8cpp_source.html#l00063">blockheaderToJSON()</a>, <a class="el" href="blockchain_8cpp_source.html#l00090">blockToJSON()</a>, <a class="el" href="blockchain_8cpp_source.html#l00394">getblockheaders()</a>, <a class="el" href="net__processing_8cpp_source.html#l01074">ProcessMessage()</a>, <a class="el" href="rest_8cpp_source.html#l00129">rest_headers()</a>, <a class="el" href="wallet_8cpp_source.html#l01687">CWallet::ScanForWalletTransactions()</a>, and <a class="el" href="validation_8cpp_source.html#l03841">CVerifyDB::VerifyDB()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a13c4493c833ffb8d1725fde05e42b28a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a13c4493c833ffb8d1725fde05e42b28a">◆ </a></span>operator[]()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classCBlockIndex.html">CBlockIndex</a>* CChain::operator[] </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>nHeight</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Returns the index entry at a particular height in this chain, or NULL if no such height exists. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8h_source.html#l00371">371</a> of file <a class="el" href="chain_8h_source.html">chain.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aeb563751f7362d4308c7c2cb35b834a5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aeb563751f7362d4308c7c2cb35b834a5">◆ </a></span>SetTip()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void CChain::SetTip </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classCBlockIndex.html">CBlockIndex</a> * </td>
|
|
<td class="paramname"><em>pindex</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Set/initialize a chain with a given tip.</p>
|
|
<p><a class="el" href="classCChain.html">CChain</a> implementation </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8cpp_source.html#l00013">13</a> of file <a class="el" href="chain_8cpp_source.html">chain.cpp</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="validation_8cpp_source.html#l03709">LoadBlockIndexDB()</a>, <a class="el" href="validation_8cpp_source.html#l03922">UnloadBlockIndex()</a>, and <a class="el" href="validation_8cpp_source.html#l02420">UpdateTip()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a578545bde95163bee37b1be28e7b2755"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a578545bde95163bee37b1be28e7b2755">◆ </a></span>Tip()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classCBlockIndex.html">CBlockIndex</a>* CChain::Tip </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Returns the index entry for the tip of this chain, or NULL if none. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8h_source.html#l00366">366</a> of file <a class="el" href="chain_8h_source.html">chain.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="validation_8cpp_source.html#l03400">AcceptBlock()</a>, <a class="el" href="validation_8cpp_source.html#l00549">AcceptToMemoryPoolWorker()</a>, <a class="el" href="validation_8cpp_source.html#l02808">ActivateBestChain()</a>, <a class="el" href="validation_8cpp_source.html#l02709">ActivateBestChainStep()</a>, <a class="el" href="net__processing_8cpp_source.html#l00677">AlreadyHave()</a>, <a class="el" href="init_8cpp_source.html#l00942">AppInit2()</a>, <a class="el" href="miner_8cpp_source.html#l00403">BitcoinMiner()</a>, <a class="el" href="validation_8cpp_source.html#l04124">CheckBlockIndex()</a>, <a class="el" href="validation_8cpp_source.html#l00213">CheckFinalTx()</a>, <a class="el" href="validation_8cpp_source.html#l01320">CheckForkWarningConditions()</a>, <a class="el" href="validation_8cpp_source.html#l01368">CheckForkWarningConditionsOnNewFork()</a>, <a class="el" href="validation_8cpp_source.html#l00346">CheckSequenceLocks()</a>, <a class="el" href="masternode_8cpp_source.html#l00671">CMasternodePing::CMasternodePing()</a>, <a class="el" href="validation_8cpp_source.html#l02535">ConnectTip()</a>, <a class="el" href="miner_8cpp_source.html#l00077">CreateNewBlock()</a>, <a class="el" href="validation_8cpp_source.html#l02477">DisconnectTip()</a>, <a class="el" href="rpcdump_8cpp_source.html#l00629">dumpwallet()</a>, <a class="el" href="validation_8cpp_source.html#l03595">FindFilesToPrune()</a>, <a class="el" href="mining_8cpp_source.html#l00122">generate()</a>, <a class="el" href="blockchain_8cpp_source.html#l00148">getbestblockhash()</a>, <a class="el" href="blockchain_8cpp_source.html#l00743">getblockchaininfo()</a>, <a class="el" href="validation_8cpp_source.html#l01911">GetBlockHash()</a>, <a class="el" href="mining_8cpp_source.html#l00337">getblocktemplate()</a>, <a class="el" href="blockchain_8cpp_source.html#l00837">getchaintips()</a>, <a class="el" href="blockchain_8cpp_source.html#l00032">GetDifficulty()</a>, <a class="el" href="clientmodel_8cpp_source.html#l00140">ClientModel::getLastBlockDate()</a>, <a class="el" href="mining_8cpp_source.html#l00044">GetNetworkHashPS()</a>, <a class="el" href="validation_8cpp_source.html#l00461">GetUTXOConfirmations()</a>, <a class="el" href="clientmodel_8cpp_source.html#l00160">ClientModel::getVerificationProgress()</a>, <a class="el" href="rpcdump_8cpp_source.html#l00305">importwallet()</a>, <a class="el" href="dsnotificationinterface_8cpp_source.html#l00014">CDSNotificationInterface::InitializeCurrentBlockTip()</a>, <a class="el" href="validation_8cpp_source.html#l02863">InvalidateBlock()</a>, <a class="el" href="validation_8cpp_source.html#l01401">InvalidChainFound()</a>, <a class="el" href="validation_8cpp_source.html#l01297">IsInitialBlockDownload()</a>, <a class="el" href="validation_8cpp_source.html#l03709">LoadBlockIndexDB()</a>, <a class="el" href="rpc_2masternode_8cpp_source.html#l00096">masternode()</a>, <a class="el" href="rpc_2masternode_8cpp_source.html#l00454">masternodelist()</a>, <a class="el" href="miner_8cpp_source.html#l00380">ProcessBlockFound()</a>, <a class="el" href="net__processing_8cpp_source.html#l00785">ProcessGetData()</a>, <a class="el" href="net__processing_8cpp_source.html#l01074">ProcessMessage()</a>, <a class="el" href="spork_8cpp_source.html#l00020">CSporkManager::ProcessSpork()</a>, <a class="el" href="validation_8cpp_source.html#l02694">PruneBlockIndexCandidates()</a>, <a class="el" href="validation_8cpp_source.html#l02971">ReceivedBlockTransactions()</a>, <a class="el" href="validation_8cpp_source.html#l02903">ReconsiderBlock()</a>, <a class="el" href="masternode-payments_8cpp_source.html#l00913">CMasternodePayments::RequestLowDataPaymentBlocks()</a>, <a class="el" href="rest_8cpp_source.html#l00403">rest_getutxos()</a>, <a class="el" href="wallet_8cpp_source.html#l01687">CWallet::ScanForWalletTransactions()</a>, <a class="el" href="net__processing_8cpp_source.html#l02296">SendMessages()</a>, <a class="el" href="validation_8cpp_source.html#l03511">TestBlockValidity()</a>, <a class="el" href="validation_8cpp_source.html#l02420">UpdateTip()</a>, <a class="el" href="validation_8cpp_source.html#l03841">CVerifyDB::VerifyDB()</a>, and <a class="el" href="validation_8cpp_source.html#l04375">VersionBitsTipState()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Friends And Related Function Documentation</h2>
|
|
<a id="a0e46ed4192afeafb8d420b2d6d9bb24c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0e46ed4192afeafb8d420b2d6d9bb24c">◆ </a></span>operator==</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool operator== </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classCChain.html">CChain</a> & </td>
|
|
<td class="paramname"><em>a</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="classCChain.html">CChain</a> & </td>
|
|
<td class="paramname"><em>b</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Compare two chains efficiently. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8h_source.html#l00378">378</a> of file <a class="el" href="chain_8h_source.html">chain.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a id="adc8fa3eb698fb5985c7b39daf6bbf708"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adc8fa3eb698fb5985c7b39daf6bbf708">◆ </a></span>vChain</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::vector<<a class="el" href="classCBlockIndex.html">CBlockIndex</a>*> CChain::vChain</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="chain_8h_source.html#l00357">357</a> of file <a class="el" href="chain_8h_source.html">chain.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="chain_8h_source.html#l00361">Genesis()</a>, <a class="el" href="chain_8h_source.html#l00397">Height()</a>, <a class="el" href="chain_8h_source.html#l00371">operator[]()</a>, and <a class="el" href="chain_8h_source.html#l00366">Tip()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li>src/<a class="el" href="chain_8h_source.html">chain.h</a></li>
|
|
<li>src/<a class="el" href="chain_8cpp_source.html">chain.cpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="classCChain.html">CChain</a></li>
|
|
<li class="footer">Generated on Thu Dec 14 2017 13:15:12 for Dash Core by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|