mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 17:56:16 +00:00
320 lines
306 KiB
HTML
320 lines
306 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: src/txmempool.cpp Source File</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('txmempool_8cpp_source.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="headertitle">
|
|
<div class="title">txmempool.cpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="txmempool_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Copyright (c) 2009-2010 Satoshi Nakamoto</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Copyright (c) 2009-2015 The Bitcoin Core developers</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// Distributed under the MIT software license, see the accompanying</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// file COPYING or http://www.opensource.org/licenses/mit-license.php.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "<a class="code" href="txmempool_8h.html">txmempool.h</a>"</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include "<a class="code" href="clientversion_8h.html">clientversion.h</a>"</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include "<a class="code" href="consensus_8h.html">consensus/consensus.h</a>"</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include "<a class="code" href="consensus_2validation_8h.html">consensus/validation.h</a>"</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "<a class="code" href="consensus_2validation_8h.html">validation.h</a>"</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include "<a class="code" href="fees_8h.html">policy/fees.h</a>"</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include "<a class="code" href="random_8h.html">random.h</a>"</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#include "<a class="code" href="streams_8h.html">streams.h</a>"</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "<a class="code" href="timedata_8h.html">timedata.h</a>"</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="util_8h.html">util.h</a>"</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="utilmoneystr_8h.html">utilmoneystr.h</a>"</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="utiltime_8h.html">utiltime.h</a>"</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="version_8h.html">version.h</a>"</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classCTxMemPoolEntry.html#af9e1f3841f5d0834b6e0e7ff25648547"> 23</a></span> <a class="code" href="classCTxMemPoolEntry.html#af9e1f3841f5d0834b6e0e7ff25648547">CTxMemPoolEntry::CTxMemPoolEntry</a>(<span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& _tx, <span class="keyword">const</span> <a class="code" href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a>& _nFee,</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  int64_t _nTime, <span class="keywordtype">double</span> _entryPriority, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _entryHeight,</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <span class="keywordtype">bool</span> poolHasNoInputsOf, <a class="code" href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a> _inChainInputValue,</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <span class="keywordtype">bool</span> _spendsCoinbase, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _sigOps, <a class="code" href="structLockPoints.html">LockPoints</a> lp):</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  tx(_tx), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), entryHeight(_entryHeight),</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  hadNoDependencies(poolHasNoInputsOf), inChainInputValue(_inChainInputValue),</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  spendsCoinbase(_spendsCoinbase), sigOpCount(_sigOps), lockPoints(lp)</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> {</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <a class="code" href="classCTxMemPoolEntry.html#a25fcb552777ae6f36df9de3f4c23bad3">nTxSize</a> = <a class="code" href="serialize_8h.html#a48239e478ae730373d1984fe304ca025">::GetSerializeSize</a>(<a class="code" href="classCTxMemPoolEntry.html#a8b320073dcb7010fbd19b100c8e13e57">tx</a>, <a class="code" href="serialize_8h.html#ae4d5251432e1a9e6803c0240cc492e18a652754eeaf79fba4fcf4c18597a6961c">SER_NETWORK</a>, <a class="code" href="version_8h.html#a4e2497f7c9c4319adcaf945159ec63f4">PROTOCOL_VERSION</a>);</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <a class="code" href="classCTxMemPoolEntry.html#af543eb39d3cb3f5bbf8244f19f22ee28">nModSize</a> = <a class="code" href="classCTxMemPoolEntry.html#a8b320073dcb7010fbd19b100c8e13e57">tx</a>.<a class="code" href="classCTransaction.html#a001aa818efad11751db060dd447dc28b">CalculateModifiedSize</a>(<a class="code" href="classCTxMemPoolEntry.html#a25fcb552777ae6f36df9de3f4c23bad3">nTxSize</a>);</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <a class="code" href="classCTxMemPoolEntry.html#a46110a49dc627ae6c08e5710f1e038cb">nUsageSize</a> = <a class="code" href="core__memusage_8h.html#a18e1e611662fcad8ad04ad0a85e84d08">RecursiveDynamicUsage</a>(<a class="code" href="classCTxMemPoolEntry.html#a8b320073dcb7010fbd19b100c8e13e57">tx</a>);</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="code" href="classCTxMemPoolEntry.html#a81a7ea21c08c211363d56c0201c65089">nCountWithDescendants</a> = 1;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <a class="code" href="classCTxMemPoolEntry.html#aa8ef89085a52247d95bafb17397608a3">nSizeWithDescendants</a> = <a class="code" href="classCTxMemPoolEntry.html#a25fcb552777ae6f36df9de3f4c23bad3">nTxSize</a>;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="classCTxMemPoolEntry.html#ab7271c4bf77171a8403a2dfd1bd69493">nModFeesWithDescendants</a> = <a class="code" href="classCTxMemPoolEntry.html#afdeeb2a36948b64dfa391e214e99e12e">nFee</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a> nValueIn = <a class="code" href="classCTxMemPoolEntry.html#a8b320073dcb7010fbd19b100c8e13e57">tx</a>.<a class="code" href="classCTransaction.html#aa4ce691dbb2ce32838d94d15801f6644">GetValueOut</a>()+<a class="code" href="classCTxMemPoolEntry.html#afdeeb2a36948b64dfa391e214e99e12e">nFee</a>;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  assert(<a class="code" href="classCTxMemPoolEntry.html#ae7579eae7d9d05bff7fad8c0e66c8627">inChainInputValue</a> <= nValueIn);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <a class="code" href="classCTxMemPoolEntry.html#a2e63a38667e065be3b07dcd4d28b6911">feeDelta</a> = 0;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> }</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classCTxMemPoolEntry.html#ad62eaba6adc7ec36487ae690b5b93148"> 44</a></span> <a class="code" href="classCTxMemPoolEntry.html#af9e1f3841f5d0834b6e0e7ff25648547">CTxMemPoolEntry::CTxMemPoolEntry</a>(<span class="keyword">const</span> <a class="code" href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a>& other)</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> {</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  *<span class="keyword">this</span> = other;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> }</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="keywordtype">double</span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classCTxMemPoolEntry.html#a189d5dbafa6e955524692c0743dc0e0b"> 50</a></span> <a class="code" href="classCTxMemPoolEntry.html#a189d5dbafa6e955524692c0743dc0e0b">CTxMemPoolEntry::GetPriority</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> currentHeight)<span class="keyword"> const</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="keyword"></span>{</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordtype">double</span> deltaPriority = ((double)(currentHeight-<a class="code" href="classCTxMemPoolEntry.html#a27a6e67929a85325138b1e281c610e06">entryHeight</a>)*<a class="code" href="classCTxMemPoolEntry.html#ae7579eae7d9d05bff7fad8c0e66c8627">inChainInputValue</a>)/<a class="code" href="classCTxMemPoolEntry.html#af543eb39d3cb3f5bbf8244f19f22ee28">nModSize</a>;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordtype">double</span> dResult = <a class="code" href="classCTxMemPoolEntry.html#a82add6154a95621a6f744ff5500e20b4">entryPriority</a> + deltaPriority;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keywordflow">if</span> (dResult < 0) <span class="comment">// This should only happen if it was called with a height below entry height</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  dResult = 0;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordflow">return</span> dResult;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> }</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classCTxMemPoolEntry.html#a1a71f74082074ee714ff266ce5cd5b11"> 59</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPoolEntry.html#a1a71f74082074ee714ff266ce5cd5b11">CTxMemPoolEntry::UpdateFeeDelta</a>(int64_t newFeeDelta)</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <a class="code" href="classCTxMemPoolEntry.html#ab7271c4bf77171a8403a2dfd1bd69493">nModFeesWithDescendants</a> += newFeeDelta - <a class="code" href="classCTxMemPoolEntry.html#a2e63a38667e065be3b07dcd4d28b6911">feeDelta</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <a class="code" href="classCTxMemPoolEntry.html#a2e63a38667e065be3b07dcd4d28b6911">feeDelta</a> = newFeeDelta;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> }</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classCTxMemPoolEntry.html#a6347f6acc814536e2fc3d1962bb169cf"> 65</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPoolEntry.html#a6347f6acc814536e2fc3d1962bb169cf">CTxMemPoolEntry::UpdateLockPoints</a>(<span class="keyword">const</span> <a class="code" href="structLockPoints.html">LockPoints</a>& lp)</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> {</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <a class="code" href="classCTxMemPoolEntry.html#ad6809157651778ea15287394e3178124">lockPoints</a> = lp;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> }</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment">// Update the given tx for any in-mempool descendants.</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment">// Assumes that setMemPoolChildren is correct for the given tx and all</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment">// descendants.</span></div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#aca7e15dfa82ccc9ab190b7c45d2c8d47"> 73</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#aca7e15dfa82ccc9ab190b7c45d2c8d47">CTxMemPool::UpdateForDescendants</a>(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> updateIt, <span class="keywordtype">int</span> maxDescendantsToVisit, <a class="code" href="classCTxMemPool.html#ab8c5d7b49c7e2576e7da2cb604fc96dc">cacheMap</a> &cachedDescendants, <span class="keyword">const</span> std::set<uint256> &setExclude)</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="comment">// Track the number of entries (outside setExclude) that we'd need to visit</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="comment">// (will bail out if it exceeds maxDescendantsToVisit)</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordtype">int</span> nChildrenToVisit = 0;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> stageEntries, setAllDescendants;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  stageEntries = <a class="code" href="classCTxMemPool.html#a0f163f91b8590b86acd43b26438d7ee1">GetMemPoolChildren</a>(updateIt);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">while</span> (!stageEntries.empty()) {</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> cit = *stageEntries.begin();</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">if</span> (cit->IsDirty()) {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="comment">// Don't consider any more children if any descendant is dirty</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  }</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  setAllDescendants.insert(cit);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  stageEntries.erase(cit);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> &setChildren = <a class="code" href="classCTxMemPool.html#a0f163f91b8590b86acd43b26438d7ee1">GetMemPoolChildren</a>(cit);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> childEntry, setChildren) {</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  cacheMap::iterator cacheIt = cachedDescendants.find(childEntry);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">if</span> (cacheIt != cachedDescendants.end()) {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="comment">// We've already calculated this one, just add the entries for this set</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="comment">// but don't traverse again.</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> cacheEntry, cacheIt->second) {</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="comment">// update visit count only for new child transactions</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="comment">// (outside of setExclude and stageEntries)</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordflow">if</span> (setAllDescendants.insert(cacheEntry).second &&</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  !setExclude.count(cacheEntry->GetTx().GetHash()) &&</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  !stageEntries.count(cacheEntry)) {</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  nChildrenToVisit++;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  }</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  }</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!setAllDescendants.count(childEntry)) {</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="comment">// Schedule for later processing and update our visit count</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">if</span> (stageEntries.insert(childEntry).second && !setExclude.count(childEntry->GetTx().GetHash())) {</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  nChildrenToVisit++;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">if</span> (nChildrenToVisit > maxDescendantsToVisit) {</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  }</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  }</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  }</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">// setAllDescendants now contains all in-mempool descendants of updateIt.</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="comment">// Update and add to cached descendant map</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  int64_t modifySize = 0;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <a class="code" href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a> modifyFee = 0;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  int64_t modifyCount = 0;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> cit, setAllDescendants) {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">if</span> (!setExclude.count(cit->GetTx().GetHash())) {</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  modifySize += cit->GetTxSize();</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  modifyFee += cit->GetModifiedFee();</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  modifyCount++;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  cachedDescendants[updateIt].insert(cit);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  }</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.modify(updateIt, <a class="code" href="structupdate__descendant__state.html">update_descendant_state</a>(modifySize, modifyFee, modifyCount));</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> </div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment">// vHashesToUpdate is the set of transaction hashes from a disconnected block</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="comment">// which has been re-added to the mempool.</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="comment">// for each entry, look for descendants that are outside hashesToUpdate, and</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="comment">// add fee/size information for such descendants to the parent.</span></div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a809f5ae70a2fabbf5bd707345ef671e9"> 137</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a809f5ae70a2fabbf5bd707345ef671e9">CTxMemPool::UpdateTransactionsFromBlock</a>(<span class="keyword">const</span> std::vector<uint256> &vHashesToUpdate)</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> {</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="comment">// For each entry in vHashesToUpdate, store the set of in-mempool, but not</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="comment">// in-vHashesToUpdate transactions, so that we don't have to recalculate</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="comment">// descendants when we come across a previously seen entry.</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <a class="code" href="classCTxMemPool.html#ab8c5d7b49c7e2576e7da2cb604fc96dc">cacheMap</a> mapMemPoolDescendantsToUpdate;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span> </div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="comment">// Use a set for lookups into vHashesToUpdate (these entries are already</span></div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="comment">// accounted for in the state of their ancestors)</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  std::set<uint256> setAlreadyIncluded(vHashesToUpdate.begin(), vHashesToUpdate.end());</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> </div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="comment">// Iterate in reverse, so that whenever we are looking at at a transaction</span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="comment">// we are sure that all in-mempool descendants have already been processed.</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="comment">// This maximizes the benefit of the descendant cache and guarantees that</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="comment">// setMemPoolChildren will be updated, an assumption made in</span></div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="comment">// UpdateForDescendants.</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  BOOST_REVERSE_FOREACH(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> &hash, vHashesToUpdate) {</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="comment">// we cache the in-mempool children to avoid duplicate updates</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> setChildren;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="comment">// calculate children from mapNextTx</span></div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(hash);</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">if</span> (it == <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end()) {</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  }</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  std::map<COutPoint, CInPoint>::iterator iter = <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.lower_bound(<a class="code" href="classCOutPoint.html">COutPoint</a>(hash, 0));</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="comment">// First calculate the children, and update setMemPoolChildren to</span></div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="comment">// include them, and update their setMemPoolParents to include this tx.</span></div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keywordflow">for</span> (; iter != <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.end() && iter->first.hash == hash; ++iter) {</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> &childHash = iter->second.ptx-><a class="code" href="classuint256.html#a6dfa79998c7cb7def7a6c7c0a6915c58">GetHash</a>();</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> childIter = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(childHash);</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  assert(childIter != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end());</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">// We can skip updating entries we've encountered before or that</span></div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="comment">// are in the block (which are already accounted for).</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">if</span> (setChildren.insert(childIter).second && !setAlreadyIncluded.count(childHash)) {</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <a class="code" href="classCTxMemPool.html#a93ee11ea2adc6021d5bf0842516222b4">UpdateChild</a>(it, childIter, <span class="keyword">true</span>);</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <a class="code" href="classCTxMemPool.html#ae6cc140209f782be93c522048595b797">UpdateParent</a>(childIter, it, <span class="keyword">true</span>);</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  }</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  }</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keywordflow">if</span> (!<a class="code" href="classCTxMemPool.html#aca7e15dfa82ccc9ab190b7c45d2c8d47">UpdateForDescendants</a>(it, 100, mapMemPoolDescendantsToUpdate, setAlreadyIncluded)) {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="comment">// Mark as dirty if we can't do the calculation.</span></div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.modify(it, <a class="code" href="structset__dirty.html">set_dirty</a>());</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  }</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  }</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span> }</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#ae755bb5ccada190327c26d09388b4139"> 183</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#ae755bb5ccada190327c26d09388b4139">CTxMemPool::CalculateMemPoolAncestors</a>(<span class="keyword">const</span> <a class="code" href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a> &entry, <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> &setAncestors, uint64_t limitAncestorCount, uint64_t limitAncestorSize, uint64_t limitDescendantCount, uint64_t limitDescendantSize, std::string &errString, <span class="keywordtype">bool</span> fSearchForParents <span class="comment">/* = true */</span>)</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> {</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> parentHashes;</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a> &tx = entry.<a class="code" href="classCTxMemPoolEntry.html#a2deed4202061edf8b040a3f554417c20">GetTx</a>();</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span> </div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordflow">if</span> (fSearchForParents) {</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="comment">// Get parents of this transaction that are in the mempool</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="comment">// GetMemPoolParents() is only valid for entries in the mempool, so we</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="comment">// iterate mapTx to find parents.</span></div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>.size(); i++) {</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> piter = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>[i].prevout.hash);</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">if</span> (piter != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end()) {</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  parentHashes.insert(piter);</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keywordflow">if</span> (parentHashes.size() + 1 > limitAncestorCount) {</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  errString = <a class="code" href="tinyformat_8h.html#a56c674871a61baaad36ad52238c08857">strprintf</a>(<span class="stringliteral">"too many unconfirmed parents [limit: %u]"</span>, limitAncestorCount);</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  }</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  }</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  }</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="comment">// If we're not searching for parents, we require this to be an</span></div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="comment">// entry in the mempool already.</span></div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.iterator_to(entry);</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  parentHashes = <a class="code" href="classCTxMemPool.html#ac3336a567bb5cd890057482170e5553d">GetMemPoolParents</a>(it);</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  }</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span> </div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordtype">size_t</span> totalSizeWithAncestors = entry.<a class="code" href="classCTxMemPoolEntry.html#a89325fcaa8efbd1d6fe68c39d7d676b0">GetTxSize</a>();</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span> </div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keywordflow">while</span> (!parentHashes.empty()) {</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> stageit = *parentHashes.begin();</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span> </div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  setAncestors.insert(stageit);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  parentHashes.erase(stageit);</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  totalSizeWithAncestors += stageit->GetTxSize();</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span> </div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="keywordflow">if</span> (stageit->GetSizeWithDescendants() + entry.<a class="code" href="classCTxMemPoolEntry.html#a89325fcaa8efbd1d6fe68c39d7d676b0">GetTxSize</a>() > limitDescendantSize) {</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  errString = <a class="code" href="tinyformat_8h.html#a56c674871a61baaad36ad52238c08857">strprintf</a>(<span class="stringliteral">"exceeds descendant size limit for tx %s [limit: %u]"</span>, stageit->GetTx().GetHash().ToString(), limitDescendantSize);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (stageit->GetCountWithDescendants() + 1 > limitDescendantCount) {</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  errString = <a class="code" href="tinyformat_8h.html#a56c674871a61baaad36ad52238c08857">strprintf</a>(<span class="stringliteral">"too many descendants for tx %s [limit: %u]"</span>, stageit->GetTx().GetHash().ToString(), limitDescendantCount);</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (totalSizeWithAncestors > limitAncestorSize) {</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  errString = <a class="code" href="tinyformat_8h.html#a56c674871a61baaad36ad52238c08857">strprintf</a>(<span class="stringliteral">"exceeds ancestor size limit [limit: %u]"</span>, limitAncestorSize);</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  }</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> & setMemPoolParents = <a class="code" href="classCTxMemPool.html#ac3336a567bb5cd890057482170e5553d">GetMemPoolParents</a>(stageit);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> &phash, setMemPoolParents) {</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="comment">// If this is a new ancestor, add it.</span></div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordflow">if</span> (setAncestors.count(phash) == 0) {</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  parentHashes.insert(phash);</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  }</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">if</span> (parentHashes.size() + setAncestors.size() + 1 > limitAncestorCount) {</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  errString = <a class="code" href="tinyformat_8h.html#a56c674871a61baaad36ad52238c08857">strprintf</a>(<span class="stringliteral">"too many unconfirmed ancestors [limit: %u]"</span>, limitAncestorCount);</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  }</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  }</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  }</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> </div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span> }</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span> </div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a1e5540275b4a83746d491a5741ec85be"> 245</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a1e5540275b4a83746d491a5741ec85be">CTxMemPool::UpdateAncestorsOf</a>(<span class="keywordtype">bool</span> add, <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it, <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> &setAncestors)</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span> {</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> parentIters = <a class="code" href="classCTxMemPool.html#ac3336a567bb5cd890057482170e5553d">GetMemPoolParents</a>(it);</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="comment">// add or remove this tx as a child of each parent</span></div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> piter, parentIters) {</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <a class="code" href="classCTxMemPool.html#a93ee11ea2adc6021d5bf0842516222b4">UpdateChild</a>(piter, it, add);</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  }</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keyword">const</span> int64_t updateCount = (add ? 1 : -1);</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keyword">const</span> int64_t updateSize = updateCount * it->GetTxSize();</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keyword">const</span> <a class="code" href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a> updateFee = updateCount * it->GetModifiedFee();</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> ancestorIt, setAncestors) {</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.modify(ancestorIt, <a class="code" href="structupdate__descendant__state.html">update_descendant_state</a>(updateSize, updateFee, updateCount));</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  }</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> }</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span> </div><div class="line"><a name="l00260"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a87623d672631b33a26e38810fa2d0006"> 260</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a87623d672631b33a26e38810fa2d0006">CTxMemPool::UpdateChildrenForRemoval</a>(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it)</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span> {</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> &setMemPoolChildren = <a class="code" href="classCTxMemPool.html#a0f163f91b8590b86acd43b26438d7ee1">GetMemPoolChildren</a>(it);</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> updateIt, setMemPoolChildren) {</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <a class="code" href="classCTxMemPool.html#ae6cc140209f782be93c522048595b797">UpdateParent</a>(updateIt, it, <span class="keyword">false</span>);</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  }</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span> }</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span> </div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a198883c2a8c25d20aea8c2d197cccf53"> 268</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a198883c2a8c25d20aea8c2d197cccf53">CTxMemPool::UpdateForRemoveFromMempool</a>(<span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> &entriesToRemove)</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span> {</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="comment">// For each entry, walk back all ancestors and decrement size associated with this</span></div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <span class="comment">// transaction</span></div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keyword">const</span> uint64_t nNoLimit = std::numeric_limits<uint64_t>::max();</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> removeIt, entriesToRemove) {</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> setAncestors;</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keyword">const</span> <a class="code" href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a> &entry = *removeIt;</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  std::string dummy;</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="comment">// Since this is a tx that is already in the mempool, we can call CMPA</span></div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="comment">// with fSearchForParents = false. If the mempool is in a consistent</span></div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="comment">// state, then using true or false should both be correct, though false</span></div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="comment">// should be a bit faster.</span></div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="comment">// However, if we happen to be in the middle of processing a reorg, then</span></div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="comment">// the mempool can be in an inconsistent state. In this case, the set</span></div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="comment">// of ancestors reachable via mapLinks will be the same as the set of </span></div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="comment">// ancestors whose packages include this transaction, because when we</span></div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="comment">// add a new transaction to the mempool in addUnchecked(), we assume it</span></div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="comment">// has no children, and in the case of a reorg where that assumption is</span></div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="comment">// false, the in-mempool children aren't linked to the in-block tx's</span></div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="comment">// until UpdateTransactionsFromBlock() is called.</span></div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="comment">// So if we're being called during a reorg, ie before</span></div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="comment">// UpdateTransactionsFromBlock() has been called, then mapLinks[] will</span></div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="comment">// differ from the set of mempool parents we'd calculate by searching,</span></div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="comment">// and it's important that we use the mapLinks[] notion of ancestor</span></div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="comment">// transactions as the set of things to update for removal.</span></div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <a class="code" href="classCTxMemPool.html#ae755bb5ccada190327c26d09388b4139">CalculateMemPoolAncestors</a>(entry, setAncestors, nNoLimit, nNoLimit, nNoLimit, nNoLimit, dummy, <span class="keyword">false</span>);</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="comment">// Note that UpdateAncestorsOf severs the child links that point to</span></div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="comment">// removeIt in the entries for the parents of removeIt. This is</span></div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <span class="comment">// fine since we don't need to use the mempool children of any entries</span></div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="comment">// to walk back over our ancestors (but we do need the mempool</span></div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="comment">// parents!)</span></div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <a class="code" href="classCTxMemPool.html#a1e5540275b4a83746d491a5741ec85be">UpdateAncestorsOf</a>(<span class="keyword">false</span>, removeIt, setAncestors);</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  }</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="comment">// After updating all the ancestor sizes, we can now sever the link between each</span></div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <span class="comment">// transaction being removed and any mempool children (ie, update setMemPoolParents</span></div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="comment">// for each direct child of a transaction being removed).</span></div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> removeIt, entriesToRemove) {</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <a class="code" href="classCTxMemPool.html#a87623d672631b33a26e38810fa2d0006">UpdateChildrenForRemoval</a>(removeIt);</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  }</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span> }</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span> </div><div class="line"><a name="l00310"></a><span class="lineno"><a class="line" href="classCTxMemPoolEntry.html#a1d31c97e6e69d8db56269bae13b6b16a"> 310</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPoolEntry.html#a1d31c97e6e69d8db56269bae13b6b16a">CTxMemPoolEntry::SetDirty</a>()</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span> {</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <a class="code" href="classCTxMemPoolEntry.html#a81a7ea21c08c211363d56c0201c65089">nCountWithDescendants</a> = 0;</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <a class="code" href="classCTxMemPoolEntry.html#aa8ef89085a52247d95bafb17397608a3">nSizeWithDescendants</a> = <a class="code" href="classCTxMemPoolEntry.html#a25fcb552777ae6f36df9de3f4c23bad3">nTxSize</a>;</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <a class="code" href="classCTxMemPoolEntry.html#ab7271c4bf77171a8403a2dfd1bd69493">nModFeesWithDescendants</a> = <a class="code" href="classCTxMemPoolEntry.html#adad4f014c99cf9fc2f23e274cd0c2132">GetModifiedFee</a>();</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span> }</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span> </div><div class="line"><a name="l00317"></a><span class="lineno"><a class="line" href="classCTxMemPoolEntry.html#a706ebb6556ae83ced50449b5839d396c"> 317</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPoolEntry.html#a706ebb6556ae83ced50449b5839d396c">CTxMemPoolEntry::UpdateState</a>(int64_t modifySize, <a class="code" href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a> modifyFee, int64_t modifyCount)</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span> {</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <span class="keywordflow">if</span> (!<a class="code" href="classCTxMemPoolEntry.html#a27bcf3eec60e841e5fafe7d74589593b">IsDirty</a>()) {</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <a class="code" href="classCTxMemPoolEntry.html#aa8ef89085a52247d95bafb17397608a3">nSizeWithDescendants</a> += modifySize;</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  assert(int64_t(<a class="code" href="classCTxMemPoolEntry.html#aa8ef89085a52247d95bafb17397608a3">nSizeWithDescendants</a>) > 0);</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <a class="code" href="classCTxMemPoolEntry.html#ab7271c4bf77171a8403a2dfd1bd69493">nModFeesWithDescendants</a> += modifyFee;</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <a class="code" href="classCTxMemPoolEntry.html#a81a7ea21c08c211363d56c0201c65089">nCountWithDescendants</a> += modifyCount;</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  assert(int64_t(<a class="code" href="classCTxMemPoolEntry.html#a81a7ea21c08c211363d56c0201c65089">nCountWithDescendants</a>) > 0);</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  }</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span> }</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span> </div><div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#abb5db4571d759f0fb540fabb4281a45e"> 328</a></span> <a class="code" href="classCTxMemPool.html#abb5db4571d759f0fb540fabb4281a45e">CTxMemPool::CTxMemPool</a>(<span class="keyword">const</span> <a class="code" href="classCFeeRate.html">CFeeRate</a>& _minReasonableRelayFee) :</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  nTransactionsUpdated(0)</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span> {</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <a class="code" href="classCTxMemPool.html#a2d04be1a3e144d466d45a5f1ec48f62c">_clear</a>(); <span class="comment">//lock free clear</span></div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span> </div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  <span class="comment">// Sanity checks off by default for performance, because otherwise</span></div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="comment">// accepting transactions becomes O(N^2) where N is the number</span></div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <span class="comment">// of transactions in the pool</span></div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  <a class="code" href="classCTxMemPool.html#a2bedc6fa86cb206e0a3077b29d14aee0">nCheckFrequency</a> = 0;</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span> </div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a> = <span class="keyword">new</span> <a class="code" href="classCBlockPolicyEstimator.html">CBlockPolicyEstimator</a>(_minReasonableRelayFee);</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <a class="code" href="classCTxMemPool.html#a721ce90d5b34cbe28705b969e4e984fe">minReasonableRelayFee</a> = _minReasonableRelayFee;</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> }</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span> </div><div class="line"><a name="l00342"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a038108efea0c4312e5bed2ce064702b2"> 342</a></span> <a class="code" href="classCTxMemPool.html#a038108efea0c4312e5bed2ce064702b2">CTxMemPool::~CTxMemPool</a>()</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span> {</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  <span class="keyword">delete</span> <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>;</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span> }</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span> </div><div class="line"><a name="l00347"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#ad6142b7cd3a58dae6cdaf03551c2f989"> 347</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#ad6142b7cd3a58dae6cdaf03551c2f989">CTxMemPool::pruneSpent</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> &hashTx, <a class="code" href="classCCoins.html">CCoins</a> &coins)</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span> {</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span> </div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  std::map<COutPoint, CInPoint>::iterator it = <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.lower_bound(<a class="code" href="classCOutPoint.html">COutPoint</a>(hashTx, 0));</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span> </div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="comment">// iterate over all COutPoints in mapNextTx whose hash equals the provided hashTx</span></div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <span class="keywordflow">while</span> (it != <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.end() && it->first.hash == hashTx) {</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  coins.<a class="code" href="classCCoins.html#a0acc5f3849c1c41386d9450a3ee3a3c8">Spend</a>(it->first.n); <span class="comment">// and remove those outputs from coins</span></div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  it++;</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  }</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span> }</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span> </div><div class="line"><a name="l00360"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#afd2a709a0e6cb34a57ff2f9fd0774e6c"> 360</a></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classCTxMemPool.html#afd2a709a0e6cb34a57ff2f9fd0774e6c">CTxMemPool::GetTransactionsUpdated</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span> <span class="keyword"></span>{</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="keywordflow">return</span> <a class="code" href="classCTxMemPool.html#a230bbfe440e222787d8d94a1aaef73d4">nTransactionsUpdated</a>;</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span> }</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span> </div><div class="line"><a name="l00366"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a3039b67e5eebaa3ff830261c192816f2"> 366</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a3039b67e5eebaa3ff830261c192816f2">CTxMemPool::AddTransactionsUpdated</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacefix-copyright-headers.html#aed10e06fbf20b2e50f73ff2d61f59e45">n</a>)</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span> {</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <a class="code" href="classCTxMemPool.html#a230bbfe440e222787d8d94a1aaef73d4">nTransactionsUpdated</a> += <a class="code" href="namespacefix-copyright-headers.html#aed10e06fbf20b2e50f73ff2d61f59e45">n</a>;</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span> }</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span> </div><div class="line"><a name="l00372"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a7cc3e776299144a8db82be568063e671"> 372</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#aab557615eb380db41237382bab239f7c">CTxMemPool::addUnchecked</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a>& hash, <span class="keyword">const</span> <a class="code" href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a> &entry, <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> &setAncestors, <span class="keywordtype">bool</span> fCurrentEstimate)</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span> {</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="comment">// Add to memory pool without checking anything.</span></div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="comment">// Used by main.cpp AcceptToMemoryPool(), which DOES do</span></div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  <span class="comment">// all the appropriate checks.</span></div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  indexed_transaction_set::iterator newit = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.insert(entry).first;</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>.insert(make_pair(newit, <a class="code" href="structCTxMemPool_1_1TxLinks.html">TxLinks</a>()));</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span> </div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="comment">// Update transaction for any feeDelta created by PrioritiseTransaction</span></div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  <span class="comment">// TODO: refactor so that the fee delta is calculated before inserting</span></div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <span class="comment">// into mapTx.</span></div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  std::map<uint256, std::pair<double, CAmount> >::const_iterator pos = <a class="code" href="classCTxMemPool.html#a341709e31a39ce7a7a951a85c775c589">mapDeltas</a>.find(hash);</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="keywordflow">if</span> (pos != <a class="code" href="classCTxMemPool.html#a341709e31a39ce7a7a951a85c775c589">mapDeltas</a>.end()) {</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <span class="keyword">const</span> std::pair<double, CAmount> &deltas = pos->second;</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  <span class="keywordflow">if</span> (deltas.second) {</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.modify(newit, <a class="code" href="structupdate__fee__delta.html">update_fee_delta</a>(deltas.second));</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  }</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  }</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span> </div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  <span class="comment">// Update cachedInnerUsage to include contained transaction's usage.</span></div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  <span class="comment">// (When we update the entry for in-mempool parents, memory usage will be</span></div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <span class="comment">// further updated.)</span></div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a> += entry.<a class="code" href="classCTxMemPoolEntry.html#ab5b85d9bd797a134072fe8706d6d7e7e">DynamicMemoryUsage</a>();</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span> </div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx = newit->GetTx();</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  std::set<uint256> setParentTransactions;</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>.size(); i++) {</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>[tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>[i].prevout] = <a class="code" href="classCInPoint.html">CInPoint</a>(&tx, i);</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  setParentTransactions.insert(tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>[i].prevout.hash);</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  }</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  <span class="comment">// Don't bother worrying about child transactions of this one.</span></div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="comment">// Normal case of a new transaction arriving is that there can't be any</span></div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <span class="comment">// children, because such children would be orphans.</span></div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <span class="comment">// An exception to that is if a transaction enters that used to be in a block.</span></div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="comment">// In that case, our disconnect block logic will call UpdateTransactionsFromBlock</span></div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="comment">// to clean up the mess we're leaving here.</span></div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span> </div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <span class="comment">// Update ancestors with information about this tx</span></div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  BOOST_FOREACH (<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> &phash, setParentTransactions) {</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> pit = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(phash);</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="keywordflow">if</span> (pit != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end()) {</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <a class="code" href="classCTxMemPool.html#ae6cc140209f782be93c522048595b797">UpdateParent</a>(newit, pit, <span class="keyword">true</span>);</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  }</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  }</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <a class="code" href="classCTxMemPool.html#a1e5540275b4a83746d491a5741ec85be">UpdateAncestorsOf</a>(<span class="keyword">true</span>, newit, setAncestors);</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span> </div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <a class="code" href="classCTxMemPool.html#a230bbfe440e222787d8d94a1aaef73d4">nTransactionsUpdated</a>++;</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <a class="code" href="classCTxMemPool.html#ac59656df749b33e9eb667a6850f36b7b">totalTxSize</a> += entry.<a class="code" href="classCTxMemPoolEntry.html#a89325fcaa8efbd1d6fe68c39d7d676b0">GetTxSize</a>();</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>-><a class="code" href="classCBlockPolicyEstimator.html#ab2a8e9135f06f38dc51031125e803a6b">processTransaction</a>(entry, fCurrentEstimate);</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span> </div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span> }</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span> </div><div class="line"><a name="l00426"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a16884a575b85f500781477a487a9b1dd"> 426</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a16884a575b85f500781477a487a9b1dd">CTxMemPool::addAddressIndex</a>(<span class="keyword">const</span> <a class="code" href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a> &entry, <span class="keyword">const</span> <a class="code" href="classCCoinsViewCache.html">CCoinsViewCache</a> &view)</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span> {</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx = entry.<a class="code" href="classCTxMemPoolEntry.html#a2deed4202061edf8b040a3f554417c20">GetTx</a>();</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  std::vector<CMempoolAddressDeltaKey> inserted;</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span> </div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <a class="code" href="classuint256.html">uint256</a> txhash = tx.<a class="code" href="classCTransaction.html#a7efd1379de830341417c0bfa23a149aa">GetHash</a>();</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = 0; j < tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>.size(); j++) {</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  <span class="keyword">const</span> <a class="code" href="classCTxIn.html">CTxIn</a> input = tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>[j];</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keyword">const</span> <a class="code" href="classCTxOut.html">CTxOut</a> &prevout = view.<a class="code" href="classCCoinsViewCache.html#a54a0de51586fa92d83cfa321fb8936c5">GetOutputFor</a>(input);</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="keywordflow">if</span> (prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classCScript.html#a0c3729c606d318923dc06f95d85a0971">IsPayToScriptHash</a>()) {</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  vector<unsigned char> hashBytes(prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classprevector.html#aa9210cbe708412a70868d6e0bca844c9">begin</a>()+2, prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classprevector.html#aa9210cbe708412a70868d6e0bca844c9">begin</a>()+22);</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <a class="code" href="structCMempoolAddressDeltaKey.html">CMempoolAddressDeltaKey</a> <a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>(2, <a class="code" href="classuint160.html">uint160</a>(hashBytes), txhash, j, 1);</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <a class="code" href="structCMempoolAddressDelta.html">CMempoolAddressDelta</a> delta(entry.<a class="code" href="classCTxMemPoolEntry.html#a9da5719dfd04508342009bea9c752160">GetTime</a>(), prevout.<a class="code" href="classCTxOut.html#ab278ecef3817a972cb6bc5360d13f197">nValue</a> * -1, input.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>, input.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#a1b857e3a0412ff741da2c9f8defe315c">n</a>);</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <a class="code" href="classCTxMemPool.html#a0d073dc0cc608d0c466d2a077c713ccc">mapAddress</a>.insert(make_pair(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>, delta));</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  inserted.push_back(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>);</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classCScript.html#abd0d9370d4d4e7b7503d680410752b2b">IsPayToPublicKeyHash</a>()) {</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  vector<unsigned char> hashBytes(prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classprevector.html#aa9210cbe708412a70868d6e0bca844c9">begin</a>()+3, prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classprevector.html#aa9210cbe708412a70868d6e0bca844c9">begin</a>()+23);</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  <a class="code" href="structCMempoolAddressDeltaKey.html">CMempoolAddressDeltaKey</a> <a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>(1, <a class="code" href="classuint160.html">uint160</a>(hashBytes), txhash, j, 1);</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <a class="code" href="structCMempoolAddressDelta.html">CMempoolAddressDelta</a> delta(entry.<a class="code" href="classCTxMemPoolEntry.html#a9da5719dfd04508342009bea9c752160">GetTime</a>(), prevout.<a class="code" href="classCTxOut.html#ab278ecef3817a972cb6bc5360d13f197">nValue</a> * -1, input.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>, input.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#a1b857e3a0412ff741da2c9f8defe315c">n</a>);</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <a class="code" href="classCTxMemPool.html#a0d073dc0cc608d0c466d2a077c713ccc">mapAddress</a>.insert(make_pair(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>, delta));</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  inserted.push_back(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>);</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  }</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  }</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span> </div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> k = 0; k < tx.<a class="code" href="classCTransaction.html#a708645274ddfd83829315ffe5c7c5c3e">vout</a>.size(); k++) {</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <span class="keyword">const</span> <a class="code" href="classCTxOut.html">CTxOut</a> &<a class="code" href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">out</a> = tx.<a class="code" href="classCTransaction.html#a708645274ddfd83829315ffe5c7c5c3e">vout</a>[k];</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">out</a>.scriptPubKey.IsPayToScriptHash()) {</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  vector<unsigned char> hashBytes(<a class="code" href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">out</a>.scriptPubKey.begin()+2, <a class="code" href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">out</a>.scriptPubKey.begin()+22);</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  <a class="code" href="structCMempoolAddressDeltaKey.html">CMempoolAddressDeltaKey</a> <a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>(2, <a class="code" href="classuint160.html">uint160</a>(hashBytes), txhash, k, 0);</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <a class="code" href="classCTxMemPool.html#a0d073dc0cc608d0c466d2a077c713ccc">mapAddress</a>.insert(make_pair(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>, <a class="code" href="structCMempoolAddressDelta.html">CMempoolAddressDelta</a>(entry.<a class="code" href="classCTxMemPoolEntry.html#a9da5719dfd04508342009bea9c752160">GetTime</a>(), <a class="code" href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">out</a>.nValue)));</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  inserted.push_back(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>);</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">out</a>.scriptPubKey.IsPayToPublicKeyHash()) {</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  vector<unsigned char> hashBytes(<a class="code" href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">out</a>.scriptPubKey.begin()+3, <a class="code" href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">out</a>.scriptPubKey.begin()+23);</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  std::pair<addressDeltaMap::iterator,bool> ret;</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <a class="code" href="structCMempoolAddressDeltaKey.html">CMempoolAddressDeltaKey</a> <a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>(1, <a class="code" href="classuint160.html">uint160</a>(hashBytes), txhash, k, 0);</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <a class="code" href="classCTxMemPool.html#a0d073dc0cc608d0c466d2a077c713ccc">mapAddress</a>.insert(make_pair(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>, <a class="code" href="structCMempoolAddressDelta.html">CMempoolAddressDelta</a>(entry.<a class="code" href="classCTxMemPoolEntry.html#a9da5719dfd04508342009bea9c752160">GetTime</a>(), <a class="code" href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">out</a>.nValue)));</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  inserted.push_back(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>);</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  }</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  }</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span> </div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  <a class="code" href="classCTxMemPool.html#a7f43d13d3305151113b643487a4cd597">mapAddressInserted</a>.insert(make_pair(txhash, inserted));</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span> }</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span> </div><div class="line"><a name="l00470"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a5225c61b3c034a9920c77f0cadc438f0"> 470</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#a5225c61b3c034a9920c77f0cadc438f0">CTxMemPool::getAddressIndex</a>(std::vector<std::pair<uint160, int> > &addresses,</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  std::vector<std::pair<CMempoolAddressDeltaKey, CMempoolAddressDelta> > &results)</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span> {</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <span class="keywordflow">for</span> (std::vector<std::pair<uint160, int> >::iterator it = addresses.begin(); it != addresses.end(); it++) {</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  addressDeltaMap::iterator ait = <a class="code" href="classCTxMemPool.html#a0d073dc0cc608d0c466d2a077c713ccc">mapAddress</a>.lower_bound(<a class="code" href="structCMempoolAddressDeltaKey.html">CMempoolAddressDeltaKey</a>((*it).second, (*it).first));</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <span class="keywordflow">while</span> (ait != <a class="code" href="classCTxMemPool.html#a0d073dc0cc608d0c466d2a077c713ccc">mapAddress</a>.end() && (*ait).first.addressBytes == (*it).first && (*ait).first.type == (*it).second) {</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  results.push_back(*ait);</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  ait++;</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  }</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  }</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span> }</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span> </div><div class="line"><a name="l00484"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a347e70ba792d5738158536b513f56aa5"> 484</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#a347e70ba792d5738158536b513f56aa5">CTxMemPool::removeAddressIndex</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> txhash)</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span> {</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  addressDeltaMapInserted::iterator it = <a class="code" href="classCTxMemPool.html#a7f43d13d3305151113b643487a4cd597">mapAddressInserted</a>.find(txhash);</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span> </div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  <span class="keywordflow">if</span> (it != <a class="code" href="classCTxMemPool.html#a7f43d13d3305151113b643487a4cd597">mapAddressInserted</a>.end()) {</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  std::vector<CMempoolAddressDeltaKey> keys = (*it).second;</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  <span class="keywordflow">for</span> (std::vector<CMempoolAddressDeltaKey>::iterator mit = keys.begin(); mit != keys.end(); mit++) {</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  <a class="code" href="classCTxMemPool.html#a0d073dc0cc608d0c466d2a077c713ccc">mapAddress</a>.erase(*mit);</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  }</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <a class="code" href="classCTxMemPool.html#a7f43d13d3305151113b643487a4cd597">mapAddressInserted</a>.erase(it);</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  }</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span> </div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span> }</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span> </div><div class="line"><a name="l00500"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a2c4f1513000ff34c3fe341e6674b2bd9"> 500</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a2c4f1513000ff34c3fe341e6674b2bd9">CTxMemPool::addSpentIndex</a>(<span class="keyword">const</span> <a class="code" href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a> &entry, <span class="keyword">const</span> <a class="code" href="classCCoinsViewCache.html">CCoinsViewCache</a> &view)</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span> {</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span> </div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  <span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx = entry.<a class="code" href="classCTxMemPoolEntry.html#a2deed4202061edf8b040a3f554417c20">GetTx</a>();</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  std::vector<CSpentIndexKey> inserted;</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span> </div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  <a class="code" href="classuint256.html">uint256</a> txhash = tx.<a class="code" href="classCTransaction.html#a7efd1379de830341417c0bfa23a149aa">GetHash</a>();</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = 0; j < tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>.size(); j++) {</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  <span class="keyword">const</span> <a class="code" href="classCTxIn.html">CTxIn</a> input = tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>[j];</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  <span class="keyword">const</span> <a class="code" href="classCTxOut.html">CTxOut</a> &prevout = view.<a class="code" href="classCCoinsViewCache.html#a54a0de51586fa92d83cfa321fb8936c5">GetOutputFor</a>(input);</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <a class="code" href="classuint160.html">uint160</a> addressHash;</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  <span class="keywordtype">int</span> addressType;</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span> </div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  <span class="keywordflow">if</span> (prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classCScript.html#a0c3729c606d318923dc06f95d85a0971">IsPayToScriptHash</a>()) {</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  addressHash = <a class="code" href="classuint160.html">uint160</a>(vector<unsigned char> (prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classprevector.html#aa9210cbe708412a70868d6e0bca844c9">begin</a>()+2, prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classprevector.html#aa9210cbe708412a70868d6e0bca844c9">begin</a>()+22));</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  addressType = 2;</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classCScript.html#abd0d9370d4d4e7b7503d680410752b2b">IsPayToPublicKeyHash</a>()) {</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  addressHash = <a class="code" href="classuint160.html">uint160</a>(vector<unsigned char> (prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classprevector.html#aa9210cbe708412a70868d6e0bca844c9">begin</a>()+3, prevout.<a class="code" href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">scriptPubKey</a>.<a class="code" href="classprevector.html#aa9210cbe708412a70868d6e0bca844c9">begin</a>()+23));</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  addressType = 1;</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  addressHash.<a class="code" href="classbase__blob.html#aa340be5328d911272eded433d03f30a3">SetNull</a>();</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  addressType = 0;</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  }</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span> </div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  <a class="code" href="structCSpentIndexKey.html">CSpentIndexKey</a> <a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a> = <a class="code" href="structCSpentIndexKey.html">CSpentIndexKey</a>(input.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>, input.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#a1b857e3a0412ff741da2c9f8defe315c">n</a>);</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  <a class="code" href="structCSpentIndexValue.html">CSpentIndexValue</a> value = <a class="code" href="structCSpentIndexValue.html">CSpentIndexValue</a>(txhash, j, -1, prevout.<a class="code" href="classCTxOut.html#ab278ecef3817a972cb6bc5360d13f197">nValue</a>, addressType, addressHash);</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span> </div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  <a class="code" href="classCTxMemPool.html#a0a846825f206a8ea2ff6d5431780c882">mapSpent</a>.insert(make_pair(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>, value));</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  inserted.push_back(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>);</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span> </div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  }</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span> </div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  <a class="code" href="classCTxMemPool.html#ab59b98a493b962027fdf71072d57a443">mapSpentInserted</a>.insert(make_pair(txhash, inserted));</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span> }</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span> </div><div class="line"><a name="l00536"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#ad5ae2f4442200f4d80e7b3aa61ec0435"> 536</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#ad5ae2f4442200f4d80e7b3aa61ec0435">CTxMemPool::getSpentIndex</a>(<a class="code" href="structCSpentIndexKey.html">CSpentIndexKey</a> &<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>, <a class="code" href="structCSpentIndexValue.html">CSpentIndexValue</a> &value)</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span> {</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  mapSpentIndex::iterator it;</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span> </div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  it = <a class="code" href="classCTxMemPool.html#a0a846825f206a8ea2ff6d5431780c882">mapSpent</a>.find(<a class="code" href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">key</a>);</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  <span class="keywordflow">if</span> (it != <a class="code" href="classCTxMemPool.html#a0a846825f206a8ea2ff6d5431780c882">mapSpent</a>.end()) {</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  value = it->second;</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  }</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span> }</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span> </div><div class="line"><a name="l00549"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#af9da5a96517cbc52516da1552f834685"> 549</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#af9da5a96517cbc52516da1552f834685">CTxMemPool::removeSpentIndex</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> txhash)</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span> {</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  mapSpentIndexInserted::iterator it = <a class="code" href="classCTxMemPool.html#ab59b98a493b962027fdf71072d57a443">mapSpentInserted</a>.find(txhash);</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span> </div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  <span class="keywordflow">if</span> (it != <a class="code" href="classCTxMemPool.html#ab59b98a493b962027fdf71072d57a443">mapSpentInserted</a>.end()) {</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  std::vector<CSpentIndexKey> keys = (*it).second;</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  <span class="keywordflow">for</span> (std::vector<CSpentIndexKey>::iterator mit = keys.begin(); mit != keys.end(); mit++) {</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  <a class="code" href="classCTxMemPool.html#a0a846825f206a8ea2ff6d5431780c882">mapSpent</a>.erase(*mit);</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  }</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  <a class="code" href="classCTxMemPool.html#ab59b98a493b962027fdf71072d57a443">mapSpentInserted</a>.erase(it);</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  }</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span> </div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span> }</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span> </div><div class="line"><a name="l00565"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#ab88e4013df24a814545aa2a142d907a8"> 565</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#ab88e4013df24a814545aa2a142d907a8">CTxMemPool::removeUnchecked</a>(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it)</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span> {</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  <span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> hash = it->GetTx().<a class="code" href="classuint256.html#a6dfa79998c7cb7def7a6c7c0a6915c58">GetHash</a>();</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxIn.html">CTxIn</a>& txin, it->GetTx().vin)</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.erase(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>);</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span> </div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  <a class="code" href="classCTxMemPool.html#ac59656df749b33e9eb667a6850f36b7b">totalTxSize</a> -= it->GetTxSize();</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a> -= it->DynamicMemoryUsage();</div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a> -= <a class="code" href="namespacememusage.html#a24d4e7ba4b087b7c854e819c37e20ea0">memusage::DynamicUsage</a>(<a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>[it].parents) + <a class="code" href="namespacememusage.html#a24d4e7ba4b087b7c854e819c37e20ea0">memusage::DynamicUsage</a>(<a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>[it].children);</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>.erase(it);</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>  <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.erase(it);</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  <a class="code" href="classCTxMemPool.html#a230bbfe440e222787d8d94a1aaef73d4">nTransactionsUpdated</a>++;</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>-><a class="code" href="classCBlockPolicyEstimator.html#a52cc7162762f37f5a246dc7a16838aa9">removeTx</a>(hash);</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  <a class="code" href="classCTxMemPool.html#a347e70ba792d5738158536b513f56aa5">removeAddressIndex</a>(hash);</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  <a class="code" href="classCTxMemPool.html#af9da5a96517cbc52516da1552f834685">removeSpentIndex</a>(hash);</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span> }</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span> </div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span> <span class="comment">// Calculates descendants of entry that are not already in setDescendants, and adds to</span></div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span> <span class="comment">// setDescendants. Assumes entryit is already a tx in the mempool and setMemPoolChildren</span></div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span> <span class="comment">// is correct for tx and all descendants.</span></div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span> <span class="comment">// Also assumes that if an entry is in setDescendants already, then all</span></div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span> <span class="comment">// in-mempool descendants of it are already in setDescendants as well, so that we</span></div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span> <span class="comment">// can save time by not iterating over those entries.</span></div><div class="line"><a name="l00588"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#aea6c845956f051442dac0a13975b2192"> 588</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#aea6c845956f051442dac0a13975b2192">CTxMemPool::CalculateDescendants</a>(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> entryit, <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> &setDescendants)</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span> {</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> stage;</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  <span class="keywordflow">if</span> (setDescendants.count(entryit) == 0) {</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  stage.insert(entryit);</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>  }</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>  <span class="comment">// Traverse down the children of entry, only adding children that are not</span></div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  <span class="comment">// accounted for in setDescendants already (because those children have either</span></div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>  <span class="comment">// already been walked, or will be walked in this iteration).</span></div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  <span class="keywordflow">while</span> (!stage.empty()) {</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it = *stage.begin();</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>  setDescendants.insert(it);</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  stage.erase(it);</div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span> </div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  <span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> &setChildren = <a class="code" href="classCTxMemPool.html#a0f163f91b8590b86acd43b26438d7ee1">GetMemPoolChildren</a>(it);</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> &childiter, setChildren) {</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  <span class="keywordflow">if</span> (!setDescendants.count(childiter)) {</div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  stage.insert(childiter);</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  }</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  }</div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  }</div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span> }</div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span> </div><div class="line"><a name="l00611"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a3a497097d9d5f325a2922a3970ac9da2"> 611</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a3a497097d9d5f325a2922a3970ac9da2">CTxMemPool::remove</a>(<span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a> &origTx, std::list<CTransaction>& removed, <span class="keywordtype">bool</span> fRecursive)</div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span> {</div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span>  <span class="comment">// Remove transaction from memory pool</span></div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  {</div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> txToRemove;</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> origit = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(origTx.<a class="code" href="classCTransaction.html#a7efd1379de830341417c0bfa23a149aa">GetHash</a>());</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>  <span class="keywordflow">if</span> (origit != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end()) {</div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>  txToRemove.insert(origit);</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fRecursive) {</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>  <span class="comment">// If recursively removing but origTx isn't in the mempool</span></div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  <span class="comment">// be sure to remove any children that are in the pool. This can</span></div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>  <span class="comment">// happen during chain re-orgs if origTx isn't re-accepted into</span></div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>  <span class="comment">// the mempool for any reason.</span></div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < origTx.<a class="code" href="classCTransaction.html#a708645274ddfd83829315ffe5c7c5c3e">vout</a>.size(); i++) {</div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  std::map<COutPoint, CInPoint>::iterator it = <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.find(<a class="code" href="classCOutPoint.html">COutPoint</a>(origTx.<a class="code" href="classCTransaction.html#a7efd1379de830341417c0bfa23a149aa">GetHash</a>(), i));</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  <span class="keywordflow">if</span> (it == <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.end())</div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> nextit = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(it->second.ptx->GetHash());</div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span>  assert(nextit != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end());</div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  txToRemove.insert(nextit);</div><div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  }</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  }</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> setAllRemoves;</div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  <span class="keywordflow">if</span> (fRecursive) {</div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it, txToRemove) {</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span>  <a class="code" href="classCTxMemPool.html#aea6c845956f051442dac0a13975b2192">CalculateDescendants</a>(it, setAllRemoves);</div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span>  }</div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>  setAllRemoves.swap(txToRemove);</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span>  }</div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it, setAllRemoves) {</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>  removed.push_back(it->GetTx());</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>  }</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  <a class="code" href="classCTxMemPool.html#abed0125e15673d8ad9daec4309f8d513">RemoveStaged</a>(setAllRemoves);</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>  }</div><div class="line"><a name="l00647"></a><span class="lineno"> 647</span> }</div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span> </div><div class="line"><a name="l00649"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#acf12e024f4d6d5c0437227bc419c28fb"> 649</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#acf12e024f4d6d5c0437227bc419c28fb">CTxMemPool::removeForReorg</a>(<span class="keyword">const</span> <a class="code" href="classCCoinsViewCache.html">CCoinsViewCache</a> *pcoins, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nMemPoolHeight, <span class="keywordtype">int</span> <a class="code" href="dash-tx_8cpp.html#ac8bf36fe0577cba66bccda3a6f7e80a4">flags</a>)</div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span> {</div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span>  <span class="comment">// Remove transactions spending a coinbase which are now immature and no-longer-final transactions</span></div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>  list<CTransaction> transactionsToRemove;</div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span>  <span class="keywordflow">for</span> (indexed_transaction_set::const_iterator it = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.begin(); it != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end(); it++) {</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>  <span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx = it->GetTx();</div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span>  <a class="code" href="structLockPoints.html">LockPoints</a> lp = it->GetLockPoints();</div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span>  <span class="keywordtype">bool</span> validLP = <a class="code" href="validation_8cpp.html#a2b1fec98f6318f76274f831b0d894ca2">TestLockPointValidity</a>(&lp);</div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span>  <span class="keywordflow">if</span> (!<a class="code" href="validation_8cpp.html#a7e254ea66e047c3d3ed0bedc5997fc4f">CheckFinalTx</a>(tx, <a class="code" href="dash-tx_8cpp.html#ac8bf36fe0577cba66bccda3a6f7e80a4">flags</a>) || !<a class="code" href="validation_8cpp.html#ad6a438d8b190d5742cc471452da5d709">CheckSequenceLocks</a>(tx, <a class="code" href="dash-tx_8cpp.html#ac8bf36fe0577cba66bccda3a6f7e80a4">flags</a>, &lp, validLP)) {</div><div class="line"><a name="l00659"></a><span class="lineno"> 659</span>  <span class="comment">// Note if CheckSequenceLocks fails the LockPoints may still be invalid</span></div><div class="line"><a name="l00660"></a><span class="lineno"> 660</span>  <span class="comment">// So it's critical that we remove the tx and not depend on the LockPoints.</span></div><div class="line"><a name="l00661"></a><span class="lineno"> 661</span>  transactionsToRemove.push_back(tx);</div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (it->GetSpendsCoinbase()) {</div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxIn.html">CTxIn</a>& txin, tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>) {</div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span>  indexed_transaction_set::const_iterator it2 = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>);</div><div class="line"><a name="l00665"></a><span class="lineno"> 665</span>  <span class="keywordflow">if</span> (it2 != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end())</div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  <span class="keyword">const</span> <a class="code" href="classCCoins.html">CCoins</a> *coins = pcoins-><a class="code" href="classCCoinsViewCache.html#a8e5341e8b01233949d6170dd4d1fd75d">AccessCoins</a>(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>);</div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>  <span class="keywordflow">if</span> (<a class="code" href="classCTxMemPool.html#a2bedc6fa86cb206e0a3077b29d14aee0">nCheckFrequency</a> != 0) assert(coins);</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span>  <span class="keywordflow">if</span> (!coins || (coins-><a class="code" href="classCCoins.html#a976c1374c3398e1ee23b1110f1663895">IsCoinBase</a>() && ((<span class="keywordtype">signed</span> <a class="code" href="namespacetest__framework_1_1script.html#a9bd02d6caf0c4901bebad69c1cf4eca5">long</a>)nMemPoolHeight) - coins-><a class="code" href="classCCoins.html#af7396dfad71367de46f21cf92e2c70ab">nHeight</a> < <a class="code" href="consensus_8h.html#adeaaac740ae92deabb436ab75c835701">COINBASE_MATURITY</a>)) {</div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span>  transactionsToRemove.push_back(tx);</div><div class="line"><a name="l00671"></a><span class="lineno"> 671</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span>  }</div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>  }</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span>  }</div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span>  <span class="keywordflow">if</span> (!validLP) {</div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span>  <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.modify(it, <a class="code" href="structupdate__lock__points.html">update_lock_points</a>(lp));</div><div class="line"><a name="l00677"></a><span class="lineno"> 677</span>  }</div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span>  }</div><div class="line"><a name="l00679"></a><span class="lineno"> 679</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx, transactionsToRemove) {</div><div class="line"><a name="l00680"></a><span class="lineno"> 680</span>  list<CTransaction> removed;</div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span>  <span class="keyword">remove</span>(tx, removed, <span class="keyword">true</span>);</div><div class="line"><a name="l00682"></a><span class="lineno"> 682</span>  }</div><div class="line"><a name="l00683"></a><span class="lineno"> 683</span> }</div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span> </div><div class="line"><a name="l00685"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a11f1bddfbae7c03c6244db322876c0a7"> 685</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a11f1bddfbae7c03c6244db322876c0a7">CTxMemPool::removeConflicts</a>(<span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a> &tx, std::list<CTransaction>& removed)</div><div class="line"><a name="l00686"></a><span class="lineno"> 686</span> {</div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span>  <span class="comment">// Remove transactions which depend on inputs of tx, recursively</span></div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span>  list<CTransaction> <a class="code" href="namespacerpcuser.html#a637791b4450c02d511291cd297ce12df">result</a>;</div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00690"></a><span class="lineno"> 690</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxIn.html">CTxIn</a> &txin, tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>) {</div><div class="line"><a name="l00691"></a><span class="lineno"> 691</span>  std::map<COutPoint, CInPoint>::iterator it = <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.find(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>);</div><div class="line"><a name="l00692"></a><span class="lineno"> 692</span>  <span class="keywordflow">if</span> (it != <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.end()) {</div><div class="line"><a name="l00693"></a><span class="lineno"> 693</span>  <span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a> &txConflict = *it->second.ptx;</div><div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  <span class="keywordflow">if</span> (txConflict != tx)</div><div class="line"><a name="l00695"></a><span class="lineno"> 695</span>  {</div><div class="line"><a name="l00696"></a><span class="lineno"> 696</span>  <span class="keyword">remove</span>(txConflict, removed, <span class="keyword">true</span>);</div><div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  <a class="code" href="classCTxMemPool.html#a11dea05121ab8321e1d1f1a21ec5c9ac">ClearPrioritisation</a>(txConflict.<a class="code" href="classCTransaction.html#a7efd1379de830341417c0bfa23a149aa">GetHash</a>());</div><div class="line"><a name="l00698"></a><span class="lineno"> 698</span>  }</div><div class="line"><a name="l00699"></a><span class="lineno"> 699</span>  }</div><div class="line"><a name="l00700"></a><span class="lineno"> 700</span>  }</div><div class="line"><a name="l00701"></a><span class="lineno"> 701</span> }</div><div class="line"><a name="l00702"></a><span class="lineno"> 702</span> </div><div class="line"><a name="l00706"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#aea14d073b24e31251465ac3c2279ee65"> 706</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#aea14d073b24e31251465ac3c2279ee65">CTxMemPool::removeForBlock</a>(<span class="keyword">const</span> std::vector<CTransaction>& vtx, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nBlockHeight,</div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span>  std::list<CTransaction>& conflicts, <span class="keywordtype">bool</span> fCurrentEstimate)</div><div class="line"><a name="l00708"></a><span class="lineno"> 708</span> {</div><div class="line"><a name="l00709"></a><span class="lineno"> 709</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00710"></a><span class="lineno"> 710</span>  std::vector<CTxMemPoolEntry> entries;</div><div class="line"><a name="l00711"></a><span class="lineno"> 711</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx, vtx)</div><div class="line"><a name="l00712"></a><span class="lineno"> 712</span>  {</div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span>  <a class="code" href="classuint256.html">uint256</a> hash = tx.<a class="code" href="classCTransaction.html#a7efd1379de830341417c0bfa23a149aa">GetHash</a>();</div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span> </div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span>  indexed_transaction_set::iterator i = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(hash);</div><div class="line"><a name="l00716"></a><span class="lineno"> 716</span>  <span class="keywordflow">if</span> (i != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end())</div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  entries.push_back(*i);</div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  }</div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx, vtx)</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span>  {</div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  std::list<CTransaction> dummy;</div><div class="line"><a name="l00722"></a><span class="lineno"> 722</span>  <span class="keyword">remove</span>(tx, dummy, <span class="keyword">false</span>);</div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span>  <a class="code" href="classCTxMemPool.html#a11f1bddfbae7c03c6244db322876c0a7">removeConflicts</a>(tx, conflicts);</div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  <a class="code" href="classCTxMemPool.html#a11dea05121ab8321e1d1f1a21ec5c9ac">ClearPrioritisation</a>(tx.<a class="code" href="classCTransaction.html#a7efd1379de830341417c0bfa23a149aa">GetHash</a>());</div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span>  }</div><div class="line"><a name="l00726"></a><span class="lineno"> 726</span>  <span class="comment">// After the txs in the new block have been removed from the mempool, update policy estimates</span></div><div class="line"><a name="l00727"></a><span class="lineno"> 727</span>  <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>-><a class="code" href="classCBlockPolicyEstimator.html#a4dbf4773f292c71c51cd17b7eb67dad0">processBlock</a>(nBlockHeight, entries, fCurrentEstimate);</div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span>  <a class="code" href="classCTxMemPool.html#a606251440078b03cee0d4568974e5ef4">lastRollingFeeUpdate</a> = <a class="code" href="utiltime_8cpp.html#a46fac5fba8ba905b5f9acb364f5d8c6f">GetTime</a>();</div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span>  <a class="code" href="classCTxMemPool.html#af1878f46ec4c9609ea0b6c5bd96e2541">blockSinceLastRollingFeeBump</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span> }</div><div class="line"><a name="l00731"></a><span class="lineno"> 731</span> </div><div class="line"><a name="l00732"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a2d04be1a3e144d466d45a5f1ec48f62c"> 732</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a2d04be1a3e144d466d45a5f1ec48f62c">CTxMemPool::_clear</a>()</div><div class="line"><a name="l00733"></a><span class="lineno"> 733</span> {</div><div class="line"><a name="l00734"></a><span class="lineno"> 734</span>  <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>.clear();</div><div class="line"><a name="l00735"></a><span class="lineno"> 735</span>  <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.clear();</div><div class="line"><a name="l00736"></a><span class="lineno"> 736</span>  <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.clear();</div><div class="line"><a name="l00737"></a><span class="lineno"> 737</span>  <a class="code" href="classCTxMemPool.html#ac59656df749b33e9eb667a6850f36b7b">totalTxSize</a> = 0;</div><div class="line"><a name="l00738"></a><span class="lineno"> 738</span>  <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a> = 0;</div><div class="line"><a name="l00739"></a><span class="lineno"> 739</span>  <a class="code" href="classCTxMemPool.html#a606251440078b03cee0d4568974e5ef4">lastRollingFeeUpdate</a> = <a class="code" href="utiltime_8cpp.html#a46fac5fba8ba905b5f9acb364f5d8c6f">GetTime</a>();</div><div class="line"><a name="l00740"></a><span class="lineno"> 740</span>  <a class="code" href="classCTxMemPool.html#af1878f46ec4c9609ea0b6c5bd96e2541">blockSinceLastRollingFeeBump</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00741"></a><span class="lineno"> 741</span>  <a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a> = 0;</div><div class="line"><a name="l00742"></a><span class="lineno"> 742</span>  ++<a class="code" href="classCTxMemPool.html#a230bbfe440e222787d8d94a1aaef73d4">nTransactionsUpdated</a>;</div><div class="line"><a name="l00743"></a><span class="lineno"> 743</span> }</div><div class="line"><a name="l00744"></a><span class="lineno"> 744</span> </div><div class="line"><a name="l00745"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a6dba6bce4139392751321438a29b6b09"> 745</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a6dba6bce4139392751321438a29b6b09">CTxMemPool::clear</a>()</div><div class="line"><a name="l00746"></a><span class="lineno"> 746</span> {</div><div class="line"><a name="l00747"></a><span class="lineno"> 747</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00748"></a><span class="lineno"> 748</span>  <a class="code" href="classCTxMemPool.html#a2d04be1a3e144d466d45a5f1ec48f62c">_clear</a>();</div><div class="line"><a name="l00749"></a><span class="lineno"> 749</span> }</div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span> </div><div class="line"><a name="l00751"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#ab30fadfa811829e79accca41da6a8328"> 751</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#ab30fadfa811829e79accca41da6a8328">CTxMemPool::check</a>(<span class="keyword">const</span> <a class="code" href="classCCoinsViewCache.html">CCoinsViewCache</a> *pcoins)<span class="keyword"> const</span></div><div class="line"><a name="l00752"></a><span class="lineno"> 752</span> <span class="keyword"></span>{</div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span>  <span class="keywordflow">if</span> (<a class="code" href="classCTxMemPool.html#a2bedc6fa86cb206e0a3077b29d14aee0">nCheckFrequency</a> == 0)</div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00755"></a><span class="lineno"> 755</span> </div><div class="line"><a name="l00756"></a><span class="lineno"> 756</span>  <span class="keywordflow">if</span> (<a class="code" href="random_8h.html#ae8f7a2f188545bbbf746160adc42038e">insecure_rand</a>() >= <a class="code" href="classCTxMemPool.html#a2bedc6fa86cb206e0a3077b29d14aee0">nCheckFrequency</a>)</div><div class="line"><a name="l00757"></a><span class="lineno"> 757</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00758"></a><span class="lineno"> 758</span> </div><div class="line"><a name="l00759"></a><span class="lineno"> 759</span>  <a class="code" href="util_8h.html#aab1f837a2366f424bdc996fdf6352171">LogPrint</a>(<span class="stringliteral">"mempool"</span>, <span class="stringliteral">"Checking mempool with %u transactions and %u inputs\n"</span>, (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)<a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.size(), (<span class="keywordtype">unsigned</span> int)<a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.size());</div><div class="line"><a name="l00760"></a><span class="lineno"> 760</span> </div><div class="line"><a name="l00761"></a><span class="lineno"> 761</span>  uint64_t checkTotal = 0;</div><div class="line"><a name="l00762"></a><span class="lineno"> 762</span>  uint64_t innerUsage = 0;</div><div class="line"><a name="l00763"></a><span class="lineno"> 763</span> </div><div class="line"><a name="l00764"></a><span class="lineno"> 764</span>  <a class="code" href="classCCoinsViewCache.html">CCoinsViewCache</a> mempoolDuplicate(const_cast<CCoinsViewCache*>(pcoins));</div><div class="line"><a name="l00765"></a><span class="lineno"> 765</span> </div><div class="line"><a name="l00766"></a><span class="lineno"> 766</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00767"></a><span class="lineno"> 767</span>  list<const CTxMemPoolEntry*> waitingOnDependants;</div><div class="line"><a name="l00768"></a><span class="lineno"> 768</span>  <span class="keywordflow">for</span> (indexed_transaction_set::const_iterator it = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.begin(); it != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end(); it++) {</div><div class="line"><a name="l00769"></a><span class="lineno"> 769</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0;</div><div class="line"><a name="l00770"></a><span class="lineno"> 770</span>  checkTotal += it->GetTxSize();</div><div class="line"><a name="l00771"></a><span class="lineno"> 771</span>  innerUsage += it->DynamicMemoryUsage();</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>  <span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx = it->GetTx();</div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span>  txlinksMap::const_iterator linksiter = <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>.find(it);</div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>  assert(linksiter != <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>.end());</div><div class="line"><a name="l00775"></a><span class="lineno"> 775</span>  <span class="keyword">const</span> <a class="code" href="structCTxMemPool_1_1TxLinks.html">TxLinks</a> &links = linksiter->second;</div><div class="line"><a name="l00776"></a><span class="lineno"> 776</span>  innerUsage += <a class="code" href="namespacememusage.html#a24d4e7ba4b087b7c854e819c37e20ea0">memusage::DynamicUsage</a>(links.parents) + <a class="code" href="namespacememusage.html#a24d4e7ba4b087b7c854e819c37e20ea0">memusage::DynamicUsage</a>(links.children);</div><div class="line"><a name="l00777"></a><span class="lineno"> 777</span>  <span class="keywordtype">bool</span> fDependsWait = <span class="keyword">false</span>;</div><div class="line"><a name="l00778"></a><span class="lineno"> 778</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> setParentCheck;</div><div class="line"><a name="l00779"></a><span class="lineno"> 779</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxIn.html">CTxIn</a> &txin, tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>) {</div><div class="line"><a name="l00780"></a><span class="lineno"> 780</span>  <span class="comment">// Check that every mempool transaction's inputs refer to available coins, or other mempool tx's.</span></div><div class="line"><a name="l00781"></a><span class="lineno"> 781</span>  indexed_transaction_set::const_iterator it2 = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>);</div><div class="line"><a name="l00782"></a><span class="lineno"> 782</span>  <span class="keywordflow">if</span> (it2 != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end()) {</div><div class="line"><a name="l00783"></a><span class="lineno"> 783</span>  <span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx2 = it2->GetTx();</div><div class="line"><a name="l00784"></a><span class="lineno"> 784</span>  assert(tx2.<a class="code" href="classCTransaction.html#a708645274ddfd83829315ffe5c7c5c3e">vout</a>.size() > txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#a1b857e3a0412ff741da2c9f8defe315c">n</a> && !tx2.<a class="code" href="classCTransaction.html#a708645274ddfd83829315ffe5c7c5c3e">vout</a>[txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#a1b857e3a0412ff741da2c9f8defe315c">n</a>].IsNull());</div><div class="line"><a name="l00785"></a><span class="lineno"> 785</span>  fDependsWait = <span class="keyword">true</span>;</div><div class="line"><a name="l00786"></a><span class="lineno"> 786</span>  setParentCheck.insert(it2);</div><div class="line"><a name="l00787"></a><span class="lineno"> 787</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00788"></a><span class="lineno"> 788</span>  <span class="keyword">const</span> <a class="code" href="classCCoins.html">CCoins</a>* coins = pcoins-><a class="code" href="classCCoinsViewCache.html#a8e5341e8b01233949d6170dd4d1fd75d">AccessCoins</a>(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>);</div><div class="line"><a name="l00789"></a><span class="lineno"> 789</span>  assert(coins && coins-><a class="code" href="classCCoins.html#aa645bc3d18f74e91430ac178a9d28ee4">IsAvailable</a>(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#a1b857e3a0412ff741da2c9f8defe315c">n</a>));</div><div class="line"><a name="l00790"></a><span class="lineno"> 790</span>  }</div><div class="line"><a name="l00791"></a><span class="lineno"> 791</span>  <span class="comment">// Check whether its inputs are marked in mapNextTx.</span></div><div class="line"><a name="l00792"></a><span class="lineno"> 792</span>  std::map<COutPoint, CInPoint>::const_iterator it3 = <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.find(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>);</div><div class="line"><a name="l00793"></a><span class="lineno"> 793</span>  assert(it3 != <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.end());</div><div class="line"><a name="l00794"></a><span class="lineno"> 794</span>  assert(it3->second.ptx == &tx);</div><div class="line"><a name="l00795"></a><span class="lineno"> 795</span>  assert(it3->second.n == i);</div><div class="line"><a name="l00796"></a><span class="lineno"> 796</span>  i++;</div><div class="line"><a name="l00797"></a><span class="lineno"> 797</span>  }</div><div class="line"><a name="l00798"></a><span class="lineno"> 798</span>  assert(setParentCheck == <a class="code" href="classCTxMemPool.html#ac3336a567bb5cd890057482170e5553d">GetMemPoolParents</a>(it));</div><div class="line"><a name="l00799"></a><span class="lineno"> 799</span>  <span class="comment">// Check children against mapNextTx</span></div><div class="line"><a name="l00800"></a><span class="lineno"> 800</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">CTxMemPool::setEntries</a> setChildrenCheck;</div><div class="line"><a name="l00801"></a><span class="lineno"> 801</span>  std::map<COutPoint, CInPoint>::const_iterator iter = <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.lower_bound(<a class="code" href="classCOutPoint.html">COutPoint</a>(it->GetTx().GetHash(), 0));</div><div class="line"><a name="l00802"></a><span class="lineno"> 802</span>  int64_t childSizes = 0;</div><div class="line"><a name="l00803"></a><span class="lineno"> 803</span>  <a class="code" href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a> childModFee = 0;</div><div class="line"><a name="l00804"></a><span class="lineno"> 804</span>  <span class="keywordflow">for</span> (; iter != <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.end() && iter->first.hash == it->GetTx().GetHash(); ++iter) {</div><div class="line"><a name="l00805"></a><span class="lineno"> 805</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> childit = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(iter->second.ptx->GetHash());</div><div class="line"><a name="l00806"></a><span class="lineno"> 806</span>  assert(childit != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end()); <span class="comment">// mapNextTx points to in-mempool transactions</span></div><div class="line"><a name="l00807"></a><span class="lineno"> 807</span>  <span class="keywordflow">if</span> (setChildrenCheck.insert(childit).second) {</div><div class="line"><a name="l00808"></a><span class="lineno"> 808</span>  childSizes += childit->GetTxSize();</div><div class="line"><a name="l00809"></a><span class="lineno"> 809</span>  childModFee += childit->GetModifiedFee();</div><div class="line"><a name="l00810"></a><span class="lineno"> 810</span>  }</div><div class="line"><a name="l00811"></a><span class="lineno"> 811</span>  }</div><div class="line"><a name="l00812"></a><span class="lineno"> 812</span>  assert(setChildrenCheck == <a class="code" href="classCTxMemPool.html#a0f163f91b8590b86acd43b26438d7ee1">GetMemPoolChildren</a>(it));</div><div class="line"><a name="l00813"></a><span class="lineno"> 813</span>  <span class="comment">// Also check to make sure size is greater than sum with immediate children.</span></div><div class="line"><a name="l00814"></a><span class="lineno"> 814</span>  <span class="comment">// just a sanity check, not definitive that this calc is correct...</span></div><div class="line"><a name="l00815"></a><span class="lineno"> 815</span>  <span class="keywordflow">if</span> (!it->IsDirty()) {</div><div class="line"><a name="l00816"></a><span class="lineno"> 816</span>  assert(it->GetSizeWithDescendants() >= childSizes + it->GetTxSize());</div><div class="line"><a name="l00817"></a><span class="lineno"> 817</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00818"></a><span class="lineno"> 818</span>  assert(it->GetSizeWithDescendants() == it->GetTxSize());</div><div class="line"><a name="l00819"></a><span class="lineno"> 819</span>  assert(it->GetModFeesWithDescendants() == it->GetModifiedFee());</div><div class="line"><a name="l00820"></a><span class="lineno"> 820</span>  }</div><div class="line"><a name="l00821"></a><span class="lineno"> 821</span> </div><div class="line"><a name="l00822"></a><span class="lineno"> 822</span>  <span class="keywordflow">if</span> (fDependsWait)</div><div class="line"><a name="l00823"></a><span class="lineno"> 823</span>  waitingOnDependants.push_back(&(*it));</div><div class="line"><a name="l00824"></a><span class="lineno"> 824</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00825"></a><span class="lineno"> 825</span>  <a class="code" href="classCValidationState.html">CValidationState</a> state;</div><div class="line"><a name="l00826"></a><span class="lineno"> 826</span>  assert(<a class="code" href="validation_8cpp.html#a37cc8cb057428138e28be8fe44b71b1d">CheckInputs</a>(tx, state, mempoolDuplicate, <span class="keyword">false</span>, 0, <span class="keyword">false</span>, NULL));</div><div class="line"><a name="l00827"></a><span class="lineno"> 827</span>  <a class="code" href="validation_8cpp.html#acb54672aa2ce74f5068a5cf660432b67">UpdateCoins</a>(tx, state, mempoolDuplicate, 1000000);</div><div class="line"><a name="l00828"></a><span class="lineno"> 828</span>  }</div><div class="line"><a name="l00829"></a><span class="lineno"> 829</span>  }</div><div class="line"><a name="l00830"></a><span class="lineno"> 830</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> stepsSinceLastRemove = 0;</div><div class="line"><a name="l00831"></a><span class="lineno"> 831</span>  <span class="keywordflow">while</span> (!waitingOnDependants.empty()) {</div><div class="line"><a name="l00832"></a><span class="lineno"> 832</span>  <span class="keyword">const</span> <a class="code" href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a>* entry = waitingOnDependants.front();</div><div class="line"><a name="l00833"></a><span class="lineno"> 833</span>  waitingOnDependants.pop_front();</div><div class="line"><a name="l00834"></a><span class="lineno"> 834</span>  <a class="code" href="classCValidationState.html">CValidationState</a> state;</div><div class="line"><a name="l00835"></a><span class="lineno"> 835</span>  <span class="keywordflow">if</span> (!mempoolDuplicate.<a class="code" href="classCCoinsViewCache.html#a5b1abd71c95dc7be2523b9c28839ec29">HaveInputs</a>(entry-><a class="code" href="classCTxMemPoolEntry.html#a2deed4202061edf8b040a3f554417c20">GetTx</a>())) {</div><div class="line"><a name="l00836"></a><span class="lineno"> 836</span>  waitingOnDependants.push_back(entry);</div><div class="line"><a name="l00837"></a><span class="lineno"> 837</span>  stepsSinceLastRemove++;</div><div class="line"><a name="l00838"></a><span class="lineno"> 838</span>  assert(stepsSinceLastRemove < waitingOnDependants.size());</div><div class="line"><a name="l00839"></a><span class="lineno"> 839</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00840"></a><span class="lineno"> 840</span>  assert(<a class="code" href="validation_8cpp.html#a37cc8cb057428138e28be8fe44b71b1d">CheckInputs</a>(entry-><a class="code" href="classCTxMemPoolEntry.html#a2deed4202061edf8b040a3f554417c20">GetTx</a>(), state, mempoolDuplicate, <span class="keyword">false</span>, 0, <span class="keyword">false</span>, NULL));</div><div class="line"><a name="l00841"></a><span class="lineno"> 841</span>  <a class="code" href="validation_8cpp.html#acb54672aa2ce74f5068a5cf660432b67">UpdateCoins</a>(entry-><a class="code" href="classCTxMemPoolEntry.html#a2deed4202061edf8b040a3f554417c20">GetTx</a>(), state, mempoolDuplicate, 1000000);</div><div class="line"><a name="l00842"></a><span class="lineno"> 842</span>  stepsSinceLastRemove = 0;</div><div class="line"><a name="l00843"></a><span class="lineno"> 843</span>  }</div><div class="line"><a name="l00844"></a><span class="lineno"> 844</span>  }</div><div class="line"><a name="l00845"></a><span class="lineno"> 845</span>  <span class="keywordflow">for</span> (std::map<COutPoint, CInPoint>::const_iterator it = <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.begin(); it != <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.end(); it++) {</div><div class="line"><a name="l00846"></a><span class="lineno"> 846</span>  <a class="code" href="classuint256.html">uint256</a> hash = it->second.ptx-><a class="code" href="classuint256.html#a6dfa79998c7cb7def7a6c7c0a6915c58">GetHash</a>();</div><div class="line"><a name="l00847"></a><span class="lineno"> 847</span>  indexed_transaction_set::const_iterator it2 = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(hash);</div><div class="line"><a name="l00848"></a><span class="lineno"> 848</span>  <span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx = it2->GetTx();</div><div class="line"><a name="l00849"></a><span class="lineno"> 849</span>  assert(it2 != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end());</div><div class="line"><a name="l00850"></a><span class="lineno"> 850</span>  assert(&tx == it->second.ptx);</div><div class="line"><a name="l00851"></a><span class="lineno"> 851</span>  assert(tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>.size() > it->second.n);</div><div class="line"><a name="l00852"></a><span class="lineno"> 852</span>  assert(it->first == it->second.ptx->vin[it->second.n].prevout);</div><div class="line"><a name="l00853"></a><span class="lineno"> 853</span>  }</div><div class="line"><a name="l00854"></a><span class="lineno"> 854</span> </div><div class="line"><a name="l00855"></a><span class="lineno"> 855</span>  assert(<a class="code" href="classCTxMemPool.html#ac59656df749b33e9eb667a6850f36b7b">totalTxSize</a> == checkTotal);</div><div class="line"><a name="l00856"></a><span class="lineno"> 856</span>  assert(innerUsage == <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a>);</div><div class="line"><a name="l00857"></a><span class="lineno"> 857</span> }</div><div class="line"><a name="l00858"></a><span class="lineno"> 858</span> </div><div class="line"><a name="l00859"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a42fa7d41a45562d02e356f2e7708bb02"> 859</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a42fa7d41a45562d02e356f2e7708bb02">CTxMemPool::queryHashes</a>(vector<uint256>& vtxid)</div><div class="line"><a name="l00860"></a><span class="lineno"> 860</span> {</div><div class="line"><a name="l00861"></a><span class="lineno"> 861</span>  vtxid.clear();</div><div class="line"><a name="l00862"></a><span class="lineno"> 862</span> </div><div class="line"><a name="l00863"></a><span class="lineno"> 863</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00864"></a><span class="lineno"> 864</span>  vtxid.reserve(<a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.size());</div><div class="line"><a name="l00865"></a><span class="lineno"> 865</span>  <span class="keywordflow">for</span> (indexed_transaction_set::iterator mi = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.begin(); mi != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end(); ++mi)</div><div class="line"><a name="l00866"></a><span class="lineno"> 866</span>  vtxid.push_back(mi->GetTx().GetHash());</div><div class="line"><a name="l00867"></a><span class="lineno"> 867</span> }</div><div class="line"><a name="l00868"></a><span class="lineno"> 868</span> </div><div class="line"><a name="l00869"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#ad6d9966cdeb4b6586f7186e709b4e77e"> 869</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#ad6d9966cdeb4b6586f7186e709b4e77e">CTxMemPool::lookup</a>(<a class="code" href="classuint256.html">uint256</a> hash, <a class="code" href="classCTransaction.html">CTransaction</a>& <a class="code" href="namespacerpcuser.html#a637791b4450c02d511291cd297ce12df">result</a>)<span class="keyword"> const</span></div><div class="line"><a name="l00870"></a><span class="lineno"> 870</span> <span class="keyword"></span>{</div><div class="line"><a name="l00871"></a><span class="lineno"> 871</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00872"></a><span class="lineno"> 872</span>  indexed_transaction_set::const_iterator i = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(hash);</div><div class="line"><a name="l00873"></a><span class="lineno"> 873</span>  <span class="keywordflow">if</span> (i == <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end()) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00874"></a><span class="lineno"> 874</span>  <a class="code" href="namespacerpcuser.html#a637791b4450c02d511291cd297ce12df">result</a> = i->GetTx();</div><div class="line"><a name="l00875"></a><span class="lineno"> 875</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00876"></a><span class="lineno"> 876</span> }</div><div class="line"><a name="l00877"></a><span class="lineno"> 877</span> </div><div class="line"><a name="l00878"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a32dd66c128330aed86865c8a61857c6c"> 878</a></span> <a class="code" href="classCFeeRate.html">CFeeRate</a> <a class="code" href="classCTxMemPool.html#a32dd66c128330aed86865c8a61857c6c">CTxMemPool::estimateFee</a>(<span class="keywordtype">int</span> nBlocks)<span class="keyword"> const</span></div><div class="line"><a name="l00879"></a><span class="lineno"> 879</span> <span class="keyword"></span>{</div><div class="line"><a name="l00880"></a><span class="lineno"> 880</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00881"></a><span class="lineno"> 881</span>  <span class="keywordflow">return</span> <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>-><a class="code" href="classCBlockPolicyEstimator.html#a55418a0d0c84ff184d67b1bd366ca525">estimateFee</a>(nBlocks);</div><div class="line"><a name="l00882"></a><span class="lineno"> 882</span> }</div><div class="line"><a name="l00883"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a2b8d1adf0207a6464ef16319c53e00b1"> 883</a></span> <a class="code" href="classCFeeRate.html">CFeeRate</a> <a class="code" href="classCTxMemPool.html#a2b8d1adf0207a6464ef16319c53e00b1">CTxMemPool::estimateSmartFee</a>(<span class="keywordtype">int</span> nBlocks, <span class="keywordtype">int</span> *answerFoundAtBlocks)<span class="keyword"> const</span></div><div class="line"><a name="l00884"></a><span class="lineno"> 884</span> <span class="keyword"></span>{</div><div class="line"><a name="l00885"></a><span class="lineno"> 885</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00886"></a><span class="lineno"> 886</span>  <span class="keywordflow">return</span> <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>-><a class="code" href="classCBlockPolicyEstimator.html#acc6d4370b7b3942507647904043b181a">estimateSmartFee</a>(nBlocks, answerFoundAtBlocks, *<span class="keyword">this</span>);</div><div class="line"><a name="l00887"></a><span class="lineno"> 887</span> }</div><div class="line"><a name="l00888"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a225378304025c093d2dc5fcb754ade3b"> 888</a></span> <span class="keywordtype">double</span> <a class="code" href="classCTxMemPool.html#a225378304025c093d2dc5fcb754ade3b">CTxMemPool::estimatePriority</a>(<span class="keywordtype">int</span> nBlocks)<span class="keyword"> const</span></div><div class="line"><a name="l00889"></a><span class="lineno"> 889</span> <span class="keyword"></span>{</div><div class="line"><a name="l00890"></a><span class="lineno"> 890</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00891"></a><span class="lineno"> 891</span>  <span class="keywordflow">return</span> <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>-><a class="code" href="classCBlockPolicyEstimator.html#adcaa52e6fdabbf8b0907bb5521aaa4f9">estimatePriority</a>(nBlocks);</div><div class="line"><a name="l00892"></a><span class="lineno"> 892</span> }</div><div class="line"><a name="l00893"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#ab2913b51062eb4f4e8110fca4223f172"> 893</a></span> <span class="keywordtype">double</span> <a class="code" href="classCTxMemPool.html#ab2913b51062eb4f4e8110fca4223f172">CTxMemPool::estimateSmartPriority</a>(<span class="keywordtype">int</span> nBlocks, <span class="keywordtype">int</span> *answerFoundAtBlocks)<span class="keyword"> const</span></div><div class="line"><a name="l00894"></a><span class="lineno"> 894</span> <span class="keyword"></span>{</div><div class="line"><a name="l00895"></a><span class="lineno"> 895</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00896"></a><span class="lineno"> 896</span>  <span class="keywordflow">return</span> <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>-><a class="code" href="classCBlockPolicyEstimator.html#a81d98a40d7560a1edec92d565bb7ba4b">estimateSmartPriority</a>(nBlocks, answerFoundAtBlocks, *<span class="keyword">this</span>);</div><div class="line"><a name="l00897"></a><span class="lineno"> 897</span> }</div><div class="line"><a name="l00898"></a><span class="lineno"> 898</span> </div><div class="line"><a name="l00899"></a><span class="lineno"> 899</span> <span class="keywordtype">bool</span></div><div class="line"><a name="l00900"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a251f595b6527be005634574ce5d01f70"> 900</a></span> <a class="code" href="classCTxMemPool.html#a251f595b6527be005634574ce5d01f70">CTxMemPool::WriteFeeEstimates</a>(<a class="code" href="classCAutoFile.html">CAutoFile</a>& <a class="code" href="util_8cpp.html#a5256be9be45ec4d0909f14a61d455e23">fileout</a>)<span class="keyword"> const</span></div><div class="line"><a name="l00901"></a><span class="lineno"> 901</span> <span class="keyword"></span>{</div><div class="line"><a name="l00902"></a><span class="lineno"> 902</span>  <span class="keywordflow">try</span> {</div><div class="line"><a name="l00903"></a><span class="lineno"> 903</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00904"></a><span class="lineno"> 904</span>  <a class="code" href="util_8cpp.html#a5256be9be45ec4d0909f14a61d455e23">fileout</a> << 120000; <span class="comment">// version required to read: 0.12.00 or later</span></div><div class="line"><a name="l00905"></a><span class="lineno"> 905</span>  <a class="code" href="util_8cpp.html#a5256be9be45ec4d0909f14a61d455e23">fileout</a> << <a class="code" href="clientversion_8h.html#a9697b803a256a637d532f292442c749c">CLIENT_VERSION</a>; <span class="comment">// version that wrote the file</span></div><div class="line"><a name="l00906"></a><span class="lineno"> 906</span>  <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>-><a class="code" href="classCBlockPolicyEstimator.html#a476fd39364402e84d3740fb2b52ba23d">Write</a>(<a class="code" href="util_8cpp.html#a5256be9be45ec4d0909f14a61d455e23">fileout</a>);</div><div class="line"><a name="l00907"></a><span class="lineno"> 907</span>  }</div><div class="line"><a name="l00908"></a><span class="lineno"> 908</span>  <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&) {</div><div class="line"><a name="l00909"></a><span class="lineno"> 909</span>  <a class="code" href="util_8h.html#afc02c0a4258fedfb316be612bb659ba8">LogPrintf</a>(<span class="stringliteral">"CTxMemPool::WriteFeeEstimates(): unable to write policy estimator data (non-fatal)\n"</span>);</div><div class="line"><a name="l00910"></a><span class="lineno"> 910</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00911"></a><span class="lineno"> 911</span>  }</div><div class="line"><a name="l00912"></a><span class="lineno"> 912</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00913"></a><span class="lineno"> 913</span> }</div><div class="line"><a name="l00914"></a><span class="lineno"> 914</span> </div><div class="line"><a name="l00915"></a><span class="lineno"> 915</span> <span class="keywordtype">bool</span></div><div class="line"><a name="l00916"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a0dbbcb6a3b7e1a6c564410668c12cd4f"> 916</a></span> <a class="code" href="classCTxMemPool.html#a0dbbcb6a3b7e1a6c564410668c12cd4f">CTxMemPool::ReadFeeEstimates</a>(<a class="code" href="classCAutoFile.html">CAutoFile</a>& filein)</div><div class="line"><a name="l00917"></a><span class="lineno"> 917</span> {</div><div class="line"><a name="l00918"></a><span class="lineno"> 918</span>  <span class="keywordflow">try</span> {</div><div class="line"><a name="l00919"></a><span class="lineno"> 919</span>  <span class="keywordtype">int</span> nVersionRequired, nVersionThatWrote;</div><div class="line"><a name="l00920"></a><span class="lineno"> 920</span>  filein >> nVersionRequired >> nVersionThatWrote;</div><div class="line"><a name="l00921"></a><span class="lineno"> 921</span>  <span class="keywordflow">if</span> (nVersionRequired > <a class="code" href="clientversion_8h.html#a9697b803a256a637d532f292442c749c">CLIENT_VERSION</a>)</div><div class="line"><a name="l00922"></a><span class="lineno"> 922</span>  <span class="keywordflow">return</span> <a class="code" href="util_8h.html#af8985880cf4ef26df0a5aa2ffcb76662">error</a>(<span class="stringliteral">"CTxMemPool::ReadFeeEstimates(): up-version (%d) fee estimate file"</span>, nVersionRequired);</div><div class="line"><a name="l00923"></a><span class="lineno"> 923</span> </div><div class="line"><a name="l00924"></a><span class="lineno"> 924</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00925"></a><span class="lineno"> 925</span>  <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>-><a class="code" href="classCBlockPolicyEstimator.html#a3d6a47569d0677f8c40a6a170e8abf4d">Read</a>(filein);</div><div class="line"><a name="l00926"></a><span class="lineno"> 926</span>  }</div><div class="line"><a name="l00927"></a><span class="lineno"> 927</span>  <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&) {</div><div class="line"><a name="l00928"></a><span class="lineno"> 928</span>  <a class="code" href="util_8h.html#afc02c0a4258fedfb316be612bb659ba8">LogPrintf</a>(<span class="stringliteral">"CTxMemPool::ReadFeeEstimates(): unable to read policy estimator data (non-fatal)\n"</span>);</div><div class="line"><a name="l00929"></a><span class="lineno"> 929</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00930"></a><span class="lineno"> 930</span>  }</div><div class="line"><a name="l00931"></a><span class="lineno"> 931</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00932"></a><span class="lineno"> 932</span> }</div><div class="line"><a name="l00933"></a><span class="lineno"> 933</span> </div><div class="line"><a name="l00934"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a1a0a00279c941051af1b74c5ebeac40d"> 934</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a1a0a00279c941051af1b74c5ebeac40d">CTxMemPool::PrioritiseTransaction</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> hash, <span class="keyword">const</span> <span class="keywordtype">string</span> strHash, <span class="keywordtype">double</span> dPriorityDelta, <span class="keyword">const</span> <a class="code" href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a>& nFeeDelta)</div><div class="line"><a name="l00935"></a><span class="lineno"> 935</span> {</div><div class="line"><a name="l00936"></a><span class="lineno"> 936</span>  {</div><div class="line"><a name="l00937"></a><span class="lineno"> 937</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00938"></a><span class="lineno"> 938</span>  std::pair<double, CAmount> &deltas = <a class="code" href="classCTxMemPool.html#a341709e31a39ce7a7a951a85c775c589">mapDeltas</a>[hash];</div><div class="line"><a name="l00939"></a><span class="lineno"> 939</span>  deltas.first += dPriorityDelta;</div><div class="line"><a name="l00940"></a><span class="lineno"> 940</span>  deltas.second += nFeeDelta;</div><div class="line"><a name="l00941"></a><span class="lineno"> 941</span>  <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.find(hash);</div><div class="line"><a name="l00942"></a><span class="lineno"> 942</span>  <span class="keywordflow">if</span> (it != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end()) {</div><div class="line"><a name="l00943"></a><span class="lineno"> 943</span>  <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.modify(it, <a class="code" href="structupdate__fee__delta.html">update_fee_delta</a>(deltas.second));</div><div class="line"><a name="l00944"></a><span class="lineno"> 944</span>  <span class="comment">// Now update all ancestors' modified fees with descendants</span></div><div class="line"><a name="l00945"></a><span class="lineno"> 945</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> setAncestors;</div><div class="line"><a name="l00946"></a><span class="lineno"> 946</span>  uint64_t nNoLimit = std::numeric_limits<uint64_t>::max();</div><div class="line"><a name="l00947"></a><span class="lineno"> 947</span>  std::string dummy;</div><div class="line"><a name="l00948"></a><span class="lineno"> 948</span>  <a class="code" href="classCTxMemPool.html#ae755bb5ccada190327c26d09388b4139">CalculateMemPoolAncestors</a>(*it, setAncestors, nNoLimit, nNoLimit, nNoLimit, nNoLimit, dummy, <span class="keyword">false</span>);</div><div class="line"><a name="l00949"></a><span class="lineno"> 949</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> ancestorIt, setAncestors) {</div><div class="line"><a name="l00950"></a><span class="lineno"> 950</span>  <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.modify(ancestorIt, <a class="code" href="structupdate__descendant__state.html">update_descendant_state</a>(0, nFeeDelta, 0));</div><div class="line"><a name="l00951"></a><span class="lineno"> 951</span>  }</div><div class="line"><a name="l00952"></a><span class="lineno"> 952</span>  }</div><div class="line"><a name="l00953"></a><span class="lineno"> 953</span>  }</div><div class="line"><a name="l00954"></a><span class="lineno"> 954</span>  <a class="code" href="util_8h.html#afc02c0a4258fedfb316be612bb659ba8">LogPrintf</a>(<span class="stringliteral">"PrioritiseTransaction: %s priority += %f, fee += %d\n"</span>, strHash, dPriorityDelta, <a class="code" href="utilmoneystr_8cpp.html#a0043c9abedcbce2d7d1d2cacaf595c9e">FormatMoney</a>(nFeeDelta));</div><div class="line"><a name="l00955"></a><span class="lineno"> 955</span> }</div><div class="line"><a name="l00956"></a><span class="lineno"> 956</span> </div><div class="line"><a name="l00957"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a8bf3b1d8436f9abc68f0c8391377df5d"> 957</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a8bf3b1d8436f9abc68f0c8391377df5d">CTxMemPool::ApplyDeltas</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> hash, <span class="keywordtype">double</span> &dPriorityDelta, <a class="code" href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a> &nFeeDelta)<span class="keyword"> const</span></div><div class="line"><a name="l00958"></a><span class="lineno"> 958</span> <span class="keyword"></span>{</div><div class="line"><a name="l00959"></a><span class="lineno"> 959</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00960"></a><span class="lineno"> 960</span>  std::map<uint256, std::pair<double, CAmount> >::const_iterator pos = <a class="code" href="classCTxMemPool.html#a341709e31a39ce7a7a951a85c775c589">mapDeltas</a>.find(hash);</div><div class="line"><a name="l00961"></a><span class="lineno"> 961</span>  <span class="keywordflow">if</span> (pos == <a class="code" href="classCTxMemPool.html#a341709e31a39ce7a7a951a85c775c589">mapDeltas</a>.end())</div><div class="line"><a name="l00962"></a><span class="lineno"> 962</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00963"></a><span class="lineno"> 963</span>  <span class="keyword">const</span> std::pair<double, CAmount> &deltas = pos->second;</div><div class="line"><a name="l00964"></a><span class="lineno"> 964</span>  dPriorityDelta += deltas.first;</div><div class="line"><a name="l00965"></a><span class="lineno"> 965</span>  nFeeDelta += deltas.second;</div><div class="line"><a name="l00966"></a><span class="lineno"> 966</span> }</div><div class="line"><a name="l00967"></a><span class="lineno"> 967</span> </div><div class="line"><a name="l00968"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a11dea05121ab8321e1d1f1a21ec5c9ac"> 968</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a11dea05121ab8321e1d1f1a21ec5c9ac">CTxMemPool::ClearPrioritisation</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> hash)</div><div class="line"><a name="l00969"></a><span class="lineno"> 969</span> {</div><div class="line"><a name="l00970"></a><span class="lineno"> 970</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l00971"></a><span class="lineno"> 971</span>  <a class="code" href="classCTxMemPool.html#a341709e31a39ce7a7a951a85c775c589">mapDeltas</a>.erase(hash);</div><div class="line"><a name="l00972"></a><span class="lineno"> 972</span> }</div><div class="line"><a name="l00973"></a><span class="lineno"> 973</span> </div><div class="line"><a name="l00974"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a7a5b17b8cf4560cd681ef035880e3245"> 974</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#a7a5b17b8cf4560cd681ef035880e3245">CTxMemPool::HasNoInputsOf</a>(<span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a> &tx)<span class="keyword"> const</span></div><div class="line"><a name="l00975"></a><span class="lineno"> 975</span> <span class="keyword"></span>{</div><div class="line"><a name="l00976"></a><span class="lineno"> 976</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>.size(); i++)</div><div class="line"><a name="l00977"></a><span class="lineno"> 977</span>  <span class="keywordflow">if</span> (<a class="code" href="classCTxMemPool.html#a8b7a13b5289ab839d4460f41a7da9789">exists</a>(tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>[i].prevout.hash))</div><div class="line"><a name="l00978"></a><span class="lineno"> 978</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00979"></a><span class="lineno"> 979</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00980"></a><span class="lineno"> 980</span> }</div><div class="line"><a name="l00981"></a><span class="lineno"> 981</span> </div><div class="line"><a name="l00982"></a><span class="lineno"><a class="line" href="classCCoinsViewMemPool.html#aab9a206c304acec322fddf646c7bafb9"> 982</a></span> <a class="code" href="classCCoinsViewMemPool.html#aab9a206c304acec322fddf646c7bafb9">CCoinsViewMemPool::CCoinsViewMemPool</a>(<a class="code" href="classCCoinsView.html">CCoinsView</a> *baseIn, <a class="code" href="classCTxMemPool.html">CTxMemPool</a> &mempoolIn) : <a class="code" href="classCCoinsViewBacked.html">CCoinsViewBacked</a>(baseIn), <a class="code" href="instantx_8cpp.html#abc71256f703e47c9254093e32ed2994c">mempool</a>(mempoolIn) { }</div><div class="line"><a name="l00983"></a><span class="lineno"> 983</span> </div><div class="line"><a name="l00984"></a><span class="lineno"><a class="line" href="classCCoinsViewMemPool.html#a1a4a556821b1680ff4b73758c8a1e471"> 984</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCCoinsViewMemPool.html#a1a4a556821b1680ff4b73758c8a1e471">CCoinsViewMemPool::GetCoins</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> &txid, <a class="code" href="classCCoins.html">CCoins</a> &coins)<span class="keyword"> const </span>{</div><div class="line"><a name="l00985"></a><span class="lineno"> 985</span>  <span class="comment">// If an entry in the mempool exists, always return that one, as it's guaranteed to never</span></div><div class="line"><a name="l00986"></a><span class="lineno"> 986</span>  <span class="comment">// conflict with the underlying cache, and it cannot have pruned entries (as it contains full)</span></div><div class="line"><a name="l00987"></a><span class="lineno"> 987</span>  <span class="comment">// transactions. First checking the underlying cache risks returning a pruned entry instead.</span></div><div class="line"><a name="l00988"></a><span class="lineno"> 988</span>  <a class="code" href="classCTransaction.html">CTransaction</a> tx;</div><div class="line"><a name="l00989"></a><span class="lineno"> 989</span>  <span class="keywordflow">if</span> (<a class="code" href="classCCoinsViewMemPool.html#a7a3870fc65376cb311a0b3abb28fec10">mempool</a>.<a class="code" href="classCTxMemPool.html#ad6d9966cdeb4b6586f7186e709b4e77e">lookup</a>(txid, tx)) {</div><div class="line"><a name="l00990"></a><span class="lineno"> 990</span>  coins = <a class="code" href="classCCoins.html">CCoins</a>(tx, <a class="code" href="txmempool_8h.html#ac18cc9fcf96dcd34beef99424c12b268">MEMPOOL_HEIGHT</a>);</div><div class="line"><a name="l00991"></a><span class="lineno"> 991</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00992"></a><span class="lineno"> 992</span>  }</div><div class="line"><a name="l00993"></a><span class="lineno"> 993</span>  <span class="keywordflow">return</span> (<a class="code" href="classCCoinsViewBacked.html#a901472317114adc4c104efd61dcf6203">base</a>-><a class="code" href="classCCoinsView.html#a67d865358127bef1f0011a23d5158a9f">GetCoins</a>(txid, coins) && !coins.<a class="code" href="classCCoins.html#a597a7cb8830fc29565918ce1823b2244">IsPruned</a>());</div><div class="line"><a name="l00994"></a><span class="lineno"> 994</span> }</div><div class="line"><a name="l00995"></a><span class="lineno"> 995</span> </div><div class="line"><a name="l00996"></a><span class="lineno"><a class="line" href="classCCoinsViewMemPool.html#a2c5900448dc5570053060686ad1f014b"> 996</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCCoinsViewMemPool.html#a2c5900448dc5570053060686ad1f014b">CCoinsViewMemPool::HaveCoins</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a> &txid)<span class="keyword"> const </span>{</div><div class="line"><a name="l00997"></a><span class="lineno"> 997</span>  <span class="keywordflow">return</span> <a class="code" href="classCCoinsViewMemPool.html#a7a3870fc65376cb311a0b3abb28fec10">mempool</a>.<a class="code" href="classCTxMemPool.html#a8b7a13b5289ab839d4460f41a7da9789">exists</a>(txid) || <a class="code" href="classCCoinsViewBacked.html#a901472317114adc4c104efd61dcf6203">base</a>-><a class="code" href="classCCoinsView.html#ade3a65fc3f1b02baf7bebce630e4eba3">HaveCoins</a>(txid);</div><div class="line"><a name="l00998"></a><span class="lineno"> 998</span> }</div><div class="line"><a name="l00999"></a><span class="lineno"> 999</span> </div><div class="line"><a name="l01000"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a4fcf05ad5f15a565c4b43c4b9f29906e"> 1000</a></span> <span class="keywordtype">size_t</span> <a class="code" href="classCTxMemPool.html#a4fcf05ad5f15a565c4b43c4b9f29906e">CTxMemPool::DynamicMemoryUsage</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>  <span class="comment">// Estimate the overhead of mapTx to be 12 pointers + an allocation, as no exact formula for boost::multi_index_contained is implemented.</span></div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>  <span class="keywordflow">return</span> <a class="code" href="namespacememusage.html#ae8ade104f83bf4c608c282adc365bf90">memusage::MallocUsage</a>(<span class="keyword">sizeof</span>(<a class="code" href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a>) + 12 * <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*)) * <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.size() + <a class="code" href="namespacememusage.html#a24d4e7ba4b087b7c854e819c37e20ea0">memusage::DynamicUsage</a>(<a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>) + <a class="code" href="namespacememusage.html#a24d4e7ba4b087b7c854e819c37e20ea0">memusage::DynamicUsage</a>(<a class="code" href="classCTxMemPool.html#a341709e31a39ce7a7a951a85c775c589">mapDeltas</a>) + <a class="code" href="namespacememusage.html#a24d4e7ba4b087b7c854e819c37e20ea0">memusage::DynamicUsage</a>(<a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>) + <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a>;</div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span> }</div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span> </div><div class="line"><a name="l01006"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#abed0125e15673d8ad9daec4309f8d513"> 1006</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#abed0125e15673d8ad9daec4309f8d513">CTxMemPool::RemoveStaged</a>(<a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> &stage) {</div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>  <a class="code" href="sync_8h.html#acd61d0cb3b49f367728193720014aed0">AssertLockHeld</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>  <a class="code" href="classCTxMemPool.html#a198883c2a8c25d20aea8c2d197cccf53">UpdateForRemoveFromMempool</a>(stage);</div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a>& it, stage) {</div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>  <a class="code" href="classCTxMemPool.html#ab88e4013df24a814545aa2a142d907a8">removeUnchecked</a>(it);</div><div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>  }</div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span> }</div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span> </div><div class="line"><a name="l01014"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a283d0422469c908a881a6484308ee2b6"> 1014</a></span> <span class="keywordtype">int</span> <a class="code" href="classCTxMemPool.html#a283d0422469c908a881a6484308ee2b6">CTxMemPool::Expire</a>(int64_t time) {</div><div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>  indexed_transaction_set::nth_index<2>::type::iterator it = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.get<2>().begin();</div><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> toremove;</div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>  <span class="keywordflow">while</span> (it != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.get<2>().end() && it->GetTime() < time) {</div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>  toremove.insert(<a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.project<0>(it));</div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>  it++;</div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>  }</div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> stage;</div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> removeit, toremove) {</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>  <a class="code" href="classCTxMemPool.html#aea6c845956f051442dac0a13975b2192">CalculateDescendants</a>(removeit, stage);</div><div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>  }</div><div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>  <a class="code" href="classCTxMemPool.html#abed0125e15673d8ad9daec4309f8d513">RemoveStaged</a>(stage);</div><div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>  <span class="keywordflow">return</span> stage.size();</div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span> }</div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span> </div><div class="line"><a name="l01030"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#aab557615eb380db41237382bab239f7c"> 1030</a></span> <span class="keywordtype">bool</span> <a class="code" href="classCTxMemPool.html#aab557615eb380db41237382bab239f7c">CTxMemPool::addUnchecked</a>(<span class="keyword">const</span> <a class="code" href="classuint256.html">uint256</a>&hash, <span class="keyword">const</span> <a class="code" href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a> &entry, <span class="keywordtype">bool</span> fCurrentEstimate)</div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span> {</div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> setAncestors;</div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>  uint64_t nNoLimit = std::numeric_limits<uint64_t>::max();</div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>  std::string dummy;</div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>  <a class="code" href="classCTxMemPool.html#ae755bb5ccada190327c26d09388b4139">CalculateMemPoolAncestors</a>(entry, setAncestors, nNoLimit, nNoLimit, nNoLimit, nNoLimit, dummy);</div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>  <span class="keywordflow">return</span> <a class="code" href="classCTxMemPool.html#aab557615eb380db41237382bab239f7c">addUnchecked</a>(hash, entry, setAncestors, fCurrentEstimate);</div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span> }</div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span> </div><div class="line"><a name="l01040"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a93ee11ea2adc6021d5bf0842516222b4"> 1040</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a93ee11ea2adc6021d5bf0842516222b4">CTxMemPool::UpdateChild</a>(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> entry, <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> <a class="code" href="namespaceextract__strings__qt.html#ad0d16bc882e7eb961f7284eb6b3ec0a2">child</a>, <span class="keywordtype">bool</span> add)</div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span> {</div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> s;</div><div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>  <span class="keywordflow">if</span> (add && <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>[entry].children.insert(<a class="code" href="namespaceextract__strings__qt.html#ad0d16bc882e7eb961f7284eb6b3ec0a2">child</a>).second) {</div><div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>  <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a> += <a class="code" href="namespacememusage.html#adb94a858deacb691d493a604f572a9a9">memusage::IncrementalDynamicUsage</a>(s);</div><div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!add && <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>[entry].children.erase(<a class="code" href="namespaceextract__strings__qt.html#ad0d16bc882e7eb961f7284eb6b3ec0a2">child</a>)) {</div><div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>  <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a> -= <a class="code" href="namespacememusage.html#adb94a858deacb691d493a604f572a9a9">memusage::IncrementalDynamicUsage</a>(s);</div><div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>  }</div><div class="line"><a name="l01048"></a><span class="lineno"> 1048</span> }</div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span> </div><div class="line"><a name="l01050"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#ae6cc140209f782be93c522048595b797"> 1050</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#ae6cc140209f782be93c522048595b797">CTxMemPool::UpdateParent</a>(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> entry, <a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> parent, <span class="keywordtype">bool</span> add)</div><div class="line"><a name="l01051"></a><span class="lineno"> 1051</span> {</div><div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> s;</div><div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>  <span class="keywordflow">if</span> (add && <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>[entry].parents.insert(parent).second) {</div><div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>  <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a> += <a class="code" href="namespacememusage.html#adb94a858deacb691d493a604f572a9a9">memusage::IncrementalDynamicUsage</a>(s);</div><div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!add && <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>[entry].parents.erase(parent)) {</div><div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>  <a class="code" href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">cachedInnerUsage</a> -= <a class="code" href="namespacememusage.html#adb94a858deacb691d493a604f572a9a9">memusage::IncrementalDynamicUsage</a>(s);</div><div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>  }</div><div class="line"><a name="l01058"></a><span class="lineno"> 1058</span> }</div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span> </div><div class="line"><a name="l01060"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#ac3336a567bb5cd890057482170e5553d"> 1060</a></span> <span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">CTxMemPool::setEntries</a> & <a class="code" href="classCTxMemPool.html#ac3336a567bb5cd890057482170e5553d">CTxMemPool::GetMemPoolParents</a>(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> entry)<span class="keyword"> const</span></div><div class="line"><a name="l01061"></a><span class="lineno"> 1061</span> <span class="keyword"></span>{</div><div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>  assert (entry != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end());</div><div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>  txlinksMap::const_iterator it = <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>.find(entry);</div><div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>  assert(it != <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>.end());</div><div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>  <span class="keywordflow">return</span> it->second.parents;</div><div class="line"><a name="l01066"></a><span class="lineno"> 1066</span> }</div><div class="line"><a name="l01067"></a><span class="lineno"> 1067</span> </div><div class="line"><a name="l01068"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a0f163f91b8590b86acd43b26438d7ee1"> 1068</a></span> <span class="keyword">const</span> <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">CTxMemPool::setEntries</a> & <a class="code" href="classCTxMemPool.html#a0f163f91b8590b86acd43b26438d7ee1">CTxMemPool::GetMemPoolChildren</a>(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> entry)<span class="keyword"> const</span></div><div class="line"><a name="l01069"></a><span class="lineno"> 1069</span> <span class="keyword"></span>{</div><div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>  assert (entry != <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.end());</div><div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>  txlinksMap::const_iterator it = <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>.find(entry);</div><div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>  assert(it != <a class="code" href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">mapLinks</a>.end());</div><div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>  <span class="keywordflow">return</span> it->second.children;</div><div class="line"><a name="l01074"></a><span class="lineno"> 1074</span> }</div><div class="line"><a name="l01075"></a><span class="lineno"> 1075</span> </div><div class="line"><a name="l01076"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a232651541c3393c81153ffc289e7b71d"> 1076</a></span> <a class="code" href="classCFeeRate.html">CFeeRate</a> <a class="code" href="classCTxMemPool.html#a232651541c3393c81153ffc289e7b71d">CTxMemPool::GetMinFee</a>(<span class="keywordtype">size_t</span> sizelimit)<span class="keyword"> const </span>{</div><div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>  <span class="keywordflow">if</span> (!<a class="code" href="classCTxMemPool.html#af1878f46ec4c9609ea0b6c5bd96e2541">blockSinceLastRollingFeeBump</a> || <a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a> == 0)</div><div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>  <span class="keywordflow">return</span> <a class="code" href="classCFeeRate.html">CFeeRate</a>(<a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a>);</div><div class="line"><a name="l01080"></a><span class="lineno"> 1080</span> </div><div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>  int64_t time = <a class="code" href="utiltime_8cpp.html#a46fac5fba8ba905b5f9acb364f5d8c6f">GetTime</a>();</div><div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>  <span class="keywordflow">if</span> (time > <a class="code" href="classCTxMemPool.html#a606251440078b03cee0d4568974e5ef4">lastRollingFeeUpdate</a> + 10) {</div><div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>  <span class="keywordtype">double</span> halflife = <a class="code" href="classCTxMemPool.html#a8ba840e58bc02d95adad746491960dcd">ROLLING_FEE_HALFLIFE</a>;</div><div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>  <span class="keywordflow">if</span> (<a class="code" href="classCTxMemPool.html#a4fcf05ad5f15a565c4b43c4b9f29906e">DynamicMemoryUsage</a>() < sizelimit / 4)</div><div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>  halflife /= 4;</div><div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classCTxMemPool.html#a4fcf05ad5f15a565c4b43c4b9f29906e">DynamicMemoryUsage</a>() < sizelimit / 2)</div><div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>  halflife /= 2;</div><div class="line"><a name="l01088"></a><span class="lineno"> 1088</span> </div><div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>  <a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a> = <a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a> / pow(2.0, (time - <a class="code" href="classCTxMemPool.html#a606251440078b03cee0d4568974e5ef4">lastRollingFeeUpdate</a>) / halflife);</div><div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>  <a class="code" href="classCTxMemPool.html#a606251440078b03cee0d4568974e5ef4">lastRollingFeeUpdate</a> = time;</div><div class="line"><a name="l01091"></a><span class="lineno"> 1091</span> </div><div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>  <span class="keywordflow">if</span> (<a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a> < <a class="code" href="classCTxMemPool.html#a721ce90d5b34cbe28705b969e4e984fe">minReasonableRelayFee</a>.<a class="code" href="classCFeeRate.html#ac772be79983433d442d6b871d2fb6e11">GetFeePerK</a>() / 2) {</div><div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>  <a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a> = 0;</div><div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>  <span class="keywordflow">return</span> <a class="code" href="classCFeeRate.html">CFeeRate</a>(0);</div><div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>  }</div><div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>  }</div><div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>  <span class="keywordflow">return</span> std::max(<a class="code" href="classCFeeRate.html">CFeeRate</a>(<a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a>), <a class="code" href="classCTxMemPool.html#a721ce90d5b34cbe28705b969e4e984fe">minReasonableRelayFee</a>);</div><div class="line"><a name="l01098"></a><span class="lineno"> 1098</span> }</div><div class="line"><a name="l01099"></a><span class="lineno"> 1099</span> </div><div class="line"><a name="l01100"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a5e70f24dbd2361ec933bc4194e61ff38"> 1100</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a5e70f24dbd2361ec933bc4194e61ff38">CTxMemPool::UpdateMinFee</a>(<span class="keyword">const</span> <a class="code" href="classCFeeRate.html">CFeeRate</a>& _minReasonableRelayFee)</div><div class="line"><a name="l01101"></a><span class="lineno"> 1101</span> {</div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>  <span class="keyword">delete</span> <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a>;</div><div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>  <a class="code" href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">minerPolicyEstimator</a> = <span class="keyword">new</span> <a class="code" href="classCBlockPolicyEstimator.html">CBlockPolicyEstimator</a>(_minReasonableRelayFee);</div><div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>  <a class="code" href="classCTxMemPool.html#a721ce90d5b34cbe28705b969e4e984fe">minReasonableRelayFee</a> = _minReasonableRelayFee;</div><div class="line"><a name="l01106"></a><span class="lineno"> 1106</span> }</div><div class="line"><a name="l01107"></a><span class="lineno"> 1107</span> </div><div class="line"><a name="l01108"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a68c3b6c23f83b77a45616525c63a0a30"> 1108</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a68c3b6c23f83b77a45616525c63a0a30">CTxMemPool::trackPackageRemoved</a>(<span class="keyword">const</span> <a class="code" href="classCFeeRate.html">CFeeRate</a>& rate) {</div><div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>  <a class="code" href="sync_8h.html#acd61d0cb3b49f367728193720014aed0">AssertLockHeld</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>  <span class="keywordflow">if</span> (rate.<a class="code" href="classCFeeRate.html#ac772be79983433d442d6b871d2fb6e11">GetFeePerK</a>() > <a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a>) {</div><div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>  <a class="code" href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">rollingMinimumFeeRate</a> = rate.<a class="code" href="classCFeeRate.html#ac772be79983433d442d6b871d2fb6e11">GetFeePerK</a>();</div><div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>  <a class="code" href="classCTxMemPool.html#af1878f46ec4c9609ea0b6c5bd96e2541">blockSinceLastRollingFeeBump</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>  }</div><div class="line"><a name="l01114"></a><span class="lineno"> 1114</span> }</div><div class="line"><a name="l01115"></a><span class="lineno"> 1115</span> </div><div class="line"><a name="l01116"></a><span class="lineno"><a class="line" href="classCTxMemPool.html#a75ada1d7bb5d96989cc73ee4a0a158d8"> 1116</a></span> <span class="keywordtype">void</span> <a class="code" href="classCTxMemPool.html#a75ada1d7bb5d96989cc73ee4a0a158d8">CTxMemPool::TrimToSize</a>(<span class="keywordtype">size_t</span> sizelimit, std::vector<uint256>* pvNoSpendsRemaining) {</div><div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>  <a class="code" href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a>(<a class="code" href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">cs</a>);</div><div class="line"><a name="l01118"></a><span class="lineno"> 1118</span> </div><div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>  <span class="keywordtype">unsigned</span> nTxnRemoved = 0;</div><div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>  <a class="code" href="classCFeeRate.html">CFeeRate</a> maxFeeRateRemoved(0);</div><div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>  <span class="keywordflow">while</span> (<a class="code" href="classCTxMemPool.html#a4fcf05ad5f15a565c4b43c4b9f29906e">DynamicMemoryUsage</a>() > sizelimit) {</div><div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>  indexed_transaction_set::nth_index<1>::type::iterator it = <a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.get<1>().begin();</div><div class="line"><a name="l01123"></a><span class="lineno"> 1123</span> </div><div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>  <span class="comment">// We set the new mempool min fee to the feerate of the removed set, plus the</span></div><div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>  <span class="comment">// "minimum reasonable fee rate" (ie some value under which we consider txn</span></div><div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>  <span class="comment">// to have 0 fee). This way, we don't allow txn to enter mempool with feerate</span></div><div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>  <span class="comment">// equal to txn which were removed with no block in between.</span></div><div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>  <a class="code" href="classCFeeRate.html">CFeeRate</a> removed(it->GetModFeesWithDescendants(), it->GetSizeWithDescendants());</div><div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>  removed += <a class="code" href="classCTxMemPool.html#a721ce90d5b34cbe28705b969e4e984fe">minReasonableRelayFee</a>;</div><div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>  <a class="code" href="classCTxMemPool.html#a68c3b6c23f83b77a45616525c63a0a30">trackPackageRemoved</a>(removed);</div><div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>  maxFeeRateRemoved = std::max(maxFeeRateRemoved, removed);</div><div class="line"><a name="l01132"></a><span class="lineno"> 1132</span> </div><div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>  <a class="code" href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">setEntries</a> stage;</div><div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>  <a class="code" href="classCTxMemPool.html#aea6c845956f051442dac0a13975b2192">CalculateDescendants</a>(<a class="code" href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">mapTx</a>.project<0>(it), stage);</div><div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>  nTxnRemoved += stage.size();</div><div class="line"><a name="l01136"></a><span class="lineno"> 1136</span> </div><div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>  std::vector<CTransaction> txn;</div><div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>  <span class="keywordflow">if</span> (pvNoSpendsRemaining) {</div><div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>  txn.reserve(stage.size());</div><div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>  BOOST_FOREACH(<a class="code" href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">txiter</a> it, stage)</div><div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>  txn.push_back(it->GetTx());</div><div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>  }</div><div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>  <a class="code" href="classCTxMemPool.html#abed0125e15673d8ad9daec4309f8d513">RemoveStaged</a>(stage);</div><div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>  <span class="keywordflow">if</span> (pvNoSpendsRemaining) {</div><div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTransaction.html">CTransaction</a>& tx, txn) {</div><div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>  BOOST_FOREACH(<span class="keyword">const</span> <a class="code" href="classCTxIn.html">CTxIn</a>& txin, tx.<a class="code" href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">vin</a>) {</div><div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>  <span class="keywordflow">if</span> (<a class="code" href="classCTxMemPool.html#a8b7a13b5289ab839d4460f41a7da9789">exists</a>(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>))</div><div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>  std::map<COutPoint, CInPoint>::iterator it = <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.lower_bound(<a class="code" href="classCOutPoint.html">COutPoint</a>(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>, 0));</div><div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>  <span class="keywordflow">if</span> (it == <a class="code" href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">mapNextTx</a>.end() || it->first.hash != txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>)</div><div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>  pvNoSpendsRemaining->push_back(txin.<a class="code" href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">prevout</a>.<a class="code" href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">hash</a>);</div><div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>  }</div><div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>  }</div><div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>  }</div><div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>  }</div><div class="line"><a name="l01156"></a><span class="lineno"> 1156</span> </div><div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>  <span class="keywordflow">if</span> (maxFeeRateRemoved > <a class="code" href="classCFeeRate.html">CFeeRate</a>(0))</div><div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>  <a class="code" href="util_8h.html#aab1f837a2366f424bdc996fdf6352171">LogPrint</a>(<span class="stringliteral">"mempool"</span>, <span class="stringliteral">"Removed %u txn, rolling minimum fee bumped to %s\n"</span>, nTxnRemoved, maxFeeRateRemoved.<a class="code" href="classCFeeRate.html#a67a2711583d588edd3dfa2dba682f4ce">ToString</a>());</div><div class="line"><a name="l01159"></a><span class="lineno"> 1159</span> }</div><div class="ttc" id="classCTxMemPool_html_a606251440078b03cee0d4568974e5ef4"><div class="ttname"><a href="classCTxMemPool.html#a606251440078b03cee0d4568974e5ef4">CTxMemPool::lastRollingFeeUpdate</a></div><div class="ttdeci">int64_t lastRollingFeeUpdate</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00369">txmempool.h:369</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a75ada1d7bb5d96989cc73ee4a0a158d8"><div class="ttname"><a href="classCTxMemPool.html#a75ada1d7bb5d96989cc73ee4a0a158d8">CTxMemPool::TrimToSize</a></div><div class="ttdeci">void TrimToSize(size_t sizelimit, std::vector< uint256 > *pvNoSpendsRemaining=NULL)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01116">txmempool.cpp:1116</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a11f1bddfbae7c03c6244db322876c0a7"><div class="ttname"><a href="classCTxMemPool.html#a11f1bddfbae7c03c6244db322876c0a7">CTxMemPool::removeConflicts</a></div><div class="ttdeci">void removeConflicts(const CTransaction &tx, std::list< CTransaction > &removed)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00685">txmempool.cpp:685</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewBacked_html"><div class="ttname"><a href="classCCoinsViewBacked.html">CCoinsViewBacked</a></div><div class="ttdef"><b>Definition:</b> <a href="coins_8h_source.html#l00341">coins.h:341</a></div></div>
|
|
<div class="ttc" id="classCOutPoint_html_a1b857e3a0412ff741da2c9f8defe315c"><div class="ttname"><a href="classCOutPoint.html#a1b857e3a0412ff741da2c9f8defe315c">COutPoint::n</a></div><div class="ttdeci">uint32_t n</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00019">transaction.h:19</a></div></div>
|
|
<div class="ttc" id="serialize_8h_html_ae4d5251432e1a9e6803c0240cc492e18a652754eeaf79fba4fcf4c18597a6961c"><div class="ttname"><a href="serialize_8h.html#ae4d5251432e1a9e6803c0240cc492e18a652754eeaf79fba4fcf4c18597a6961c">SER_NETWORK</a></div><div class="ttdef"><b>Definition:</b> <a href="serialize_8h_source.html#l00170">serialize.h:170</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a198883c2a8c25d20aea8c2d197cccf53"><div class="ttname"><a href="classCTxMemPool.html#a198883c2a8c25d20aea8c2d197cccf53">CTxMemPool::UpdateForRemoveFromMempool</a></div><div class="ttdeci">void UpdateForRemoveFromMempool(const setEntries &entriesToRemove)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00268">txmempool.cpp:268</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html_a81d98a40d7560a1edec92d565bb7ba4b"><div class="ttname"><a href="classCBlockPolicyEstimator.html#a81d98a40d7560a1edec92d565bb7ba4b">CBlockPolicyEstimator::estimateSmartPriority</a></div><div class="ttdeci">double estimateSmartPriority(int confTarget, int *answerFoundAtTarget, const CTxMemPool &pool)</div><div class="ttdef"><b>Definition:</b> <a href="fees_8cpp_source.html#l00542">fees.cpp:542</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a1a71f74082074ee714ff266ce5cd5b11"><div class="ttname"><a href="classCTxMemPoolEntry.html#a1a71f74082074ee714ff266ce5cd5b11">CTxMemPoolEntry::UpdateFeeDelta</a></div><div class="ttdeci">void UpdateFeeDelta(int64_t feeDelta)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00059">txmempool.cpp:59</a></div></div>
|
|
<div class="ttc" id="classCScript_html_abd0d9370d4d4e7b7503d680410752b2b"><div class="ttname"><a href="classCScript.html#abd0d9370d4d4e7b7503d680410752b2b">CScript::IsPayToPublicKeyHash</a></div><div class="ttdeci">bool IsPayToPublicKeyHash() const</div><div class="ttdef"><b>Definition:</b> <a href="script_8cpp_source.html#l00227">script.cpp:227</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html_ab2a8e9135f06f38dc51031125e803a6b"><div class="ttname"><a href="classCBlockPolicyEstimator.html#ab2a8e9135f06f38dc51031125e803a6b">CBlockPolicyEstimator::processTransaction</a></div><div class="ttdeci">void processTransaction(const CTxMemPoolEntry &entry, bool fCurrentEstimate)</div><div class="ttdef"><b>Definition:</b> <a href="fees_8cpp_source.html#l00344">fees.cpp:344</a></div></div>
|
|
<div class="ttc" id="classCCoins_html_a976c1374c3398e1ee23b1110f1663895"><div class="ttname"><a href="classCCoins.html#a976c1374c3398e1ee23b1110f1663895">CCoins::IsCoinBase</a></div><div class="ttdeci">bool IsCoinBase() const</div><div class="ttdef"><b>Definition:</b> <a href="coins_8h_source.html#l00151">coins.h:151</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a27a6e67929a85325138b1e281c610e06"><div class="ttname"><a href="classCTxMemPoolEntry.html#a27a6e67929a85325138b1e281c610e06">CTxMemPoolEntry::entryHeight</a></div><div class="ttdeci">unsigned int entryHeight</div><div class="ttdoc">Priority when entering the mempool. </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00086">txmempool.h:86</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a283d0422469c908a881a6484308ee2b6"><div class="ttname"><a href="classCTxMemPool.html#a283d0422469c908a881a6484308ee2b6">CTxMemPool::Expire</a></div><div class="ttdeci">int Expire(int64_t time)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01014">txmempool.cpp:1014</a></div></div>
|
|
<div class="ttc" id="classCTxIn_html"><div class="ttname"><a href="classCTxIn.html">CTxIn</a></div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00058">transaction.h:58</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a3a497097d9d5f325a2922a3970ac9da2"><div class="ttname"><a href="classCTxMemPool.html#a3a497097d9d5f325a2922a3970ac9da2">CTxMemPool::remove</a></div><div class="ttdeci">void remove(const CTransaction &tx, std::list< CTransaction > &removed, bool fRecursive=false)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00611">txmempool.cpp:611</a></div></div>
|
|
<div class="ttc" id="classCCoins_html"><div class="ttname"><a href="classCCoins.html">CCoins</a></div><div class="ttdef"><b>Definition:</b> <a href="coins_8h_source.html#l00073">coins.h:73</a></div></div>
|
|
<div class="ttc" id="classbase__blob_html_aa340be5328d911272eded433d03f30a3"><div class="ttname"><a href="classbase__blob.html#aa340be5328d911272eded433d03f30a3">base_blob::SetNull</a></div><div class="ttdeci">void SetNull()</div><div class="ttdef"><b>Definition:</b> <a href="uint256_8h_source.html#l00041">uint256.h:41</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a038108efea0c4312e5bed2ce064702b2"><div class="ttname"><a href="classCTxMemPool.html#a038108efea0c4312e5bed2ce064702b2">CTxMemPool::~CTxMemPool</a></div><div class="ttdeci">~CTxMemPool()</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00342">txmempool.cpp:342</a></div></div>
|
|
<div class="ttc" id="streams_8h_html"><div class="ttname"><a href="streams_8h.html">streams.h</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a7f43d13d3305151113b643487a4cd597"><div class="ttname"><a href="classCTxMemPool.html#a7f43d13d3305151113b643487a4cd597">CTxMemPool::mapAddressInserted</a></div><div class="ttdeci">addressDeltaMapInserted mapAddressInserted</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00429">txmempool.h:429</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a46110a49dc627ae6c08e5710f1e038cb"><div class="ttname"><a href="classCTxMemPoolEntry.html#a46110a49dc627ae6c08e5710f1e038cb">CTxMemPoolEntry::nUsageSize</a></div><div class="ttdeci">size_t nUsageSize</div><div class="ttdoc">... and modified size for priority </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00083">txmempool.h:83</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a42fa7d41a45562d02e356f2e7708bb02"><div class="ttname"><a href="classCTxMemPool.html#a42fa7d41a45562d02e356f2e7708bb02">CTxMemPool::queryHashes</a></div><div class="ttdeci">void queryHashes(std::vector< uint256 > &vtxid)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00859">txmempool.cpp:859</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a27bcf3eec60e841e5fafe7d74589593b"><div class="ttname"><a href="classCTxMemPoolEntry.html#a27bcf3eec60e841e5fafe7d74589593b">CTxMemPoolEntry::IsDirty</a></div><div class="ttdeci">bool IsDirty() const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00139">txmempool.h:139</a></div></div>
|
|
<div class="ttc" id="classCInPoint_html"><div class="ttname"><a href="classCInPoint.html">CInPoint</a></div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00267">txmempool.h:267</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewBacked_html_a901472317114adc4c104efd61dcf6203"><div class="ttname"><a href="classCCoinsViewBacked.html#a901472317114adc4c104efd61dcf6203">CCoinsViewBacked::base</a></div><div class="ttdeci">CCoinsView * base</div><div class="ttdef"><b>Definition:</b> <a href="coins_8h_source.html#l00344">coins.h:344</a></div></div>
|
|
<div class="ttc" id="structLockPoints_html"><div class="ttname"><a href="structLockPoints.html">LockPoints</a></div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00042">txmempool.h:42</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a89325fcaa8efbd1d6fe68c39d7d676b0"><div class="ttname"><a href="classCTxMemPoolEntry.html#a89325fcaa8efbd1d6fe68c39d7d676b0">CTxMemPoolEntry::GetTxSize</a></div><div class="ttdeci">size_t GetTxSize() const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00117">txmempool.h:117</a></div></div>
|
|
<div class="ttc" id="tinyformat_8h_html_a56c674871a61baaad36ad52238c08857"><div class="ttname"><a href="tinyformat_8h.html#a56c674871a61baaad36ad52238c08857">strprintf</a></div><div class="ttdeci">#define strprintf</div><div class="ttdef"><b>Definition:</b> <a href="tinyformat_8h_source.html#l01011">tinyformat.h:1011</a></div></div>
|
|
<div class="ttc" id="validation_8cpp_html_a37cc8cb057428138e28be8fe44b71b1d"><div class="ttname"><a href="validation_8cpp.html#a37cc8cb057428138e28be8fe44b71b1d">CheckInputs</a></div><div class="ttdeci">bool CheckInputs(const CTransaction &tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, bool cacheStore, std::vector< CScriptCheck > *pvChecks)</div><div class="ttdef"><b>Definition:</b> <a href="validation_8cpp_source.html#l01528">validation.cpp:1528</a></div></div>
|
|
<div class="ttc" id="classuint256_html_a6dfa79998c7cb7def7a6c7c0a6915c58"><div class="ttname"><a href="classuint256.html#a6dfa79998c7cb7def7a6c7c0a6915c58">uint256::GetHash</a></div><div class="ttdeci">uint64_t GetHash(const uint256 &salt) const</div><div class="ttdef"><b>Definition:</b> <a href="uint256_8cpp_source.html#l00126">uint256.cpp:126</a></div></div>
|
|
<div class="ttc" id="namespacememusage_html_a24d4e7ba4b087b7c854e819c37e20ea0"><div class="ttname"><a href="namespacememusage.html#a24d4e7ba4b087b7c854e819c37e20ea0">memusage::DynamicUsage</a></div><div class="ttdeci">static size_t DynamicUsage(const int8_t &v)</div><div class="ttdef"><b>Definition:</b> <a href="memusage_8h_source.html#l00025">memusage.h:25</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a0dbbcb6a3b7e1a6c564410668c12cd4f"><div class="ttname"><a href="classCTxMemPool.html#a0dbbcb6a3b7e1a6c564410668c12cd4f">CTxMemPool::ReadFeeEstimates</a></div><div class="ttdeci">bool ReadFeeEstimates(CAutoFile &filein)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00916">txmempool.cpp:916</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a2b8d1adf0207a6464ef16319c53e00b1"><div class="ttname"><a href="classCTxMemPool.html#a2b8d1adf0207a6464ef16319c53e00b1">CTxMemPool::estimateSmartFee</a></div><div class="ttdeci">CFeeRate estimateSmartFee(int nBlocks, int *answerFoundAtBlocks=NULL) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00883">txmempool.cpp:883</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ac59656df749b33e9eb667a6850f36b7b"><div class="ttname"><a href="classCTxMemPool.html#ac59656df749b33e9eb667a6850f36b7b">CTxMemPool::totalTxSize</a></div><div class="ttdeci">uint64_t totalTxSize</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00364">txmempool.h:364</a></div></div>
|
|
<div class="ttc" id="util_8cpp_html_a5256be9be45ec4d0909f14a61d455e23"><div class="ttname"><a href="util_8cpp.html#a5256be9be45ec4d0909f14a61d455e23">fileout</a></div><div class="ttdeci">static FILE * fileout</div><div class="ttdef"><b>Definition:</b> <a href="util_8cpp_source.html#l00210">util.cpp:210</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ab8c5d7b49c7e2576e7da2cb604fc96dc"><div class="ttname"><a href="classCTxMemPool.html#ab8c5d7b49c7e2576e7da2cb604fc96dc">CTxMemPool::cacheMap</a></div><div class="ttdeci">std::map< txiter, setEntries, CompareIteratorByHash > cacheMap</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00415">txmempool.h:415</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a230bbfe440e222787d8d94a1aaef73d4"><div class="ttname"><a href="classCTxMemPool.html#a230bbfe440e222787d8d94a1aaef73d4">CTxMemPool::nTransactionsUpdated</a></div><div class="ttdeci">unsigned int nTransactionsUpdated</div><div class="ttdoc">Value n means that n times in 2^32 we check. </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00361">txmempool.h:361</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewMemPool_html_a1a4a556821b1680ff4b73758c8a1e471"><div class="ttname"><a href="classCCoinsViewMemPool.html#a1a4a556821b1680ff4b73758c8a1e471">CCoinsViewMemPool::GetCoins</a></div><div class="ttdeci">bool GetCoins(const uint256 &txid, CCoins &coins) const</div><div class="ttdoc">Retrieve the CCoins (unspent transaction outputs) for a given txid. </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00984">txmempool.cpp:984</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a347e70ba792d5738158536b513f56aa5"><div class="ttname"><a href="classCTxMemPool.html#a347e70ba792d5738158536b513f56aa5">CTxMemPool::removeAddressIndex</a></div><div class="ttdeci">bool removeAddressIndex(const uint256 txhash)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00484">txmempool.cpp:484</a></div></div>
|
|
<div class="ttc" id="structCTxMemPool_1_1TxLinks_html"><div class="ttname"><a href="structCTxMemPool_1_1TxLinks.html">CTxMemPool::TxLinks</a></div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00417">txmempool.h:417</a></div></div>
|
|
<div class="ttc" id="structupdate__lock__points_html"><div class="ttname"><a href="structupdate__lock__points.html">update_lock_points</a></div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00180">txmempool.h:180</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ab2913b51062eb4f4e8110fca4223f172"><div class="ttname"><a href="classCTxMemPool.html#ab2913b51062eb4f4e8110fca4223f172">CTxMemPool::estimateSmartPriority</a></div><div class="ttdeci">double estimateSmartPriority(int nBlocks, int *answerFoundAtBlocks=NULL) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00893">txmempool.cpp:893</a></div></div>
|
|
<div class="ttc" id="classCCoins_html_aa645bc3d18f74e91430ac178a9d28ee4"><div class="ttname"><a href="classCCoins.html#aa645bc3d18f74e91430ac178a9d28ee4">CCoins::IsAvailable</a></div><div class="ttdeci">bool IsAvailable(unsigned int nPos) const</div><div class="ttdoc">check whether a particular output is still available </div><div class="ttdef"><b>Definition:</b> <a href="coins_8h_source.html#l00245">coins.h:245</a></div></div>
|
|
<div class="ttc" id="classCTxOut_html_ab278ecef3817a972cb6bc5360d13f197"><div class="ttname"><a href="classCTxOut.html#ab278ecef3817a972cb6bc5360d13f197">CTxOut::nValue</a></div><div class="ttdeci">CAmount nValue</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00136">transaction.h:136</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_ab7271c4bf77171a8403a2dfd1bd69493"><div class="ttname"><a href="classCTxMemPoolEntry.html#ab7271c4bf77171a8403a2dfd1bd69493">CTxMemPoolEntry::nModFeesWithDescendants</a></div><div class="ttdeci">CAmount nModFeesWithDescendants</div><div class="ttdoc">... and size </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00101">txmempool.h:101</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a2e63a38667e065be3b07dcd4d28b6911"><div class="ttname"><a href="classCTxMemPoolEntry.html#a2e63a38667e065be3b07dcd4d28b6911">CTxMemPoolEntry::feeDelta</a></div><div class="ttdeci">int64_t feeDelta</div><div class="ttdoc">Legacy sig ops plus P2SH sig op count. </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00091">txmempool.h:91</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a82add6154a95621a6f744ff5500e20b4"><div class="ttname"><a href="classCTxMemPoolEntry.html#a82add6154a95621a6f744ff5500e20b4">CTxMemPoolEntry::entryPriority</a></div><div class="ttdeci">double entryPriority</div><div class="ttdoc">Local time when entering the mempool. </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00085">txmempool.h:85</a></div></div>
|
|
<div class="ttc" id="consensus_8h_html_adeaaac740ae92deabb436ab75c835701"><div class="ttname"><a href="consensus_8h.html#adeaaac740ae92deabb436ab75c835701">COINBASE_MATURITY</a></div><div class="ttdeci">static const int COINBASE_MATURITY</div><div class="ttdef"><b>Definition:</b> <a href="consensus_8h_source.html#l00023">consensus.h:23</a></div></div>
|
|
<div class="ttc" id="utiltime_8h_html"><div class="ttname"><a href="utiltime_8h.html">utiltime.h</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_aae6f1162f0b2e42b369971f32a9f71e8"><div class="ttname"><a href="classCTxMemPool.html#aae6f1162f0b2e42b369971f32a9f71e8">CTxMemPool::mapNextTx</a></div><div class="ttdeci">std::map< COutPoint, CInPoint > mapNextTx</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00441">txmempool.h:441</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a1e5540275b4a83746d491a5741ec85be"><div class="ttname"><a href="classCTxMemPool.html#a1e5540275b4a83746d491a5741ec85be">CTxMemPool::UpdateAncestorsOf</a></div><div class="ttdeci">void UpdateAncestorsOf(bool add, txiter hash, setEntries &setAncestors)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00245">txmempool.cpp:245</a></div></div>
|
|
<div class="ttc" id="dash-tx_8cpp_html_ac8bf36fe0577cba66bccda3a6f7e80a4"><div class="ttname"><a href="dash-tx_8cpp.html#ac8bf36fe0577cba66bccda3a6f7e80a4">flags</a></div><div class="ttdeci">int flags</div><div class="ttdef"><b>Definition:</b> <a href="dash-tx_8cpp_source.html#l00326">dash-tx.cpp:326</a></div></div>
|
|
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a721ce90d5b34cbe28705b969e4e984fe"><div class="ttname"><a href="classCTxMemPool.html#a721ce90d5b34cbe28705b969e4e984fe">CTxMemPool::minReasonableRelayFee</a></div><div class="ttdeci">CFeeRate minReasonableRelayFee</div><div class="ttdoc">sum of dynamic memory usage of all the map elements (NOT the maps themselves) </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00367">txmempool.h:367</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ae6cc140209f782be93c522048595b797"><div class="ttname"><a href="classCTxMemPool.html#ae6cc140209f782be93c522048595b797">CTxMemPool::UpdateParent</a></div><div class="ttdeci">void UpdateParent(txiter entry, txiter parent, bool add)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01050">txmempool.cpp:1050</a></div></div>
|
|
<div class="ttc" id="utilmoneystr_8h_html"><div class="ttname"><a href="utilmoneystr_8h.html">utilmoneystr.h</a></div></div>
|
|
<div class="ttc" id="classCTransaction_html_aa4ce691dbb2ce32838d94d15801f6644"><div class="ttname"><a href="classCTransaction.html#aa4ce691dbb2ce32838d94d15801f6644">CTransaction::GetValueOut</a></div><div class="ttdeci">CAmount GetValueOut() const</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8cpp_source.html#l00112">transaction.cpp:112</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a3039b67e5eebaa3ff830261c192816f2"><div class="ttname"><a href="classCTxMemPool.html#a3039b67e5eebaa3ff830261c192816f2">CTxMemPool::AddTransactionsUpdated</a></div><div class="ttdeci">void AddTransactionsUpdated(unsigned int n)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00366">txmempool.cpp:366</a></div></div>
|
|
<div class="ttc" id="classCValidationState_html"><div class="ttname"><a href="classCValidationState.html">CValidationState</a></div><div class="ttdef"><b>Definition:</b> <a href="consensus_2validation_8h_source.html#l00022">validation.h:22</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewCache_html_a54a0de51586fa92d83cfa321fb8936c5"><div class="ttname"><a href="classCCoinsViewCache.html#a54a0de51586fa92d83cfa321fb8936c5">CCoinsViewCache::GetOutputFor</a></div><div class="ttdeci">const CTxOut & GetOutputFor(const CTxIn &input) const</div><div class="ttdef"><b>Definition:</b> <a href="coins_8cpp_source.html#l00227">coins.cpp:227</a></div></div>
|
|
<div class="ttc" id="structupdate__fee__delta_html"><div class="ttname"><a href="structupdate__fee__delta.html">update_fee_delta</a></div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00170">txmempool.h:170</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_acd27558d400055a08b970bd2a0d9c953"><div class="ttname"><a href="classCTxMemPool.html#acd27558d400055a08b970bd2a0d9c953">CTxMemPool::mapTx</a></div><div class="ttdeci">indexed_transaction_set mapTx</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00403">txmempool.h:403</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html"><div class="ttname"><a href="classCTxMemPoolEntry.html">CTxMemPoolEntry</a></div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00076">txmempool.h:76</a></div></div>
|
|
<div class="ttc" id="structCMempoolAddressDeltaKey_html"><div class="ttname"><a href="structCMempoolAddressDeltaKey.html">CMempoolAddressDeltaKey</a></div><div class="ttdef"><b>Definition:</b> <a href="addressindex_8h_source.html#l00034">addressindex.h:34</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a809f5ae70a2fabbf5bd707345ef671e9"><div class="ttname"><a href="classCTxMemPool.html#a809f5ae70a2fabbf5bd707345ef671e9">CTxMemPool::UpdateTransactionsFromBlock</a></div><div class="ttdeci">void UpdateTransactionsFromBlock(const std::vector< uint256 > &hashesToUpdate)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00137">txmempool.cpp:137</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a2bedc6fa86cb206e0a3077b29d14aee0"><div class="ttname"><a href="classCTxMemPool.html#a2bedc6fa86cb206e0a3077b29d14aee0">CTxMemPool::nCheckFrequency</a></div><div class="ttdeci">uint32_t nCheckFrequency</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00360">txmempool.h:360</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_abb5db4571d759f0fb540fabb4281a45e"><div class="ttname"><a href="classCTxMemPool.html#abb5db4571d759f0fb540fabb4281a45e">CTxMemPool::CTxMemPool</a></div><div class="ttdeci">CTxMemPool(const CFeeRate &_minReasonableRelayFee)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00328">txmempool.cpp:328</a></div></div>
|
|
<div class="ttc" id="random_8h_html_ae8f7a2f188545bbbf746160adc42038e"><div class="ttname"><a href="random_8h.html#ae8f7a2f188545bbbf746160adc42038e">insecure_rand</a></div><div class="ttdeci">static uint32_t insecure_rand(void)</div><div class="ttdef"><b>Definition:</b> <a href="random_8h_source.html#l00042">random.h:42</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ae755bb5ccada190327c26d09388b4139"><div class="ttname"><a href="classCTxMemPool.html#ae755bb5ccada190327c26d09388b4139">CTxMemPool::CalculateMemPoolAncestors</a></div><div class="ttdeci">bool CalculateMemPoolAncestors(const CTxMemPoolEntry &entry, setEntries &setAncestors, uint64_t limitAncestorCount, uint64_t limitAncestorSize, uint64_t limitDescendantCount, uint64_t limitDescendantSize, std::string &errString, bool fSearchForParents=true)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00183">txmempool.cpp:183</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a0a846825f206a8ea2ff6d5431780c882"><div class="ttname"><a href="classCTxMemPool.html#a0a846825f206a8ea2ff6d5431780c882">CTxMemPool::mapSpent</a></div><div class="ttdeci">mapSpentIndex mapSpent</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00432">txmempool.h:432</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html_a55418a0d0c84ff184d67b1bd366ca525"><div class="ttname"><a href="classCBlockPolicyEstimator.html#a55418a0d0c84ff184d67b1bd366ca525">CBlockPolicyEstimator::estimateFee</a></div><div class="ttdeci">CFeeRate estimateFee(int confTarget)</div><div class="ttdef"><b>Definition:</b> <a href="fees_8cpp_source.html#l00492">fees.cpp:492</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_af9da5a96517cbc52516da1552f834685"><div class="ttname"><a href="classCTxMemPool.html#af9da5a96517cbc52516da1552f834685">CTxMemPool::removeSpentIndex</a></div><div class="ttdeci">bool removeSpentIndex(const uint256 txhash)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00549">txmempool.cpp:549</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a6347f6acc814536e2fc3d1962bb169cf"><div class="ttname"><a href="classCTxMemPoolEntry.html#a6347f6acc814536e2fc3d1962bb169cf">CTxMemPoolEntry::UpdateLockPoints</a></div><div class="ttdeci">void UpdateLockPoints(const LockPoints &lp)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00065">txmempool.cpp:65</a></div></div>
|
|
<div class="ttc" id="classCCoinsView_html_a67d865358127bef1f0011a23d5158a9f"><div class="ttname"><a href="classCCoinsView.html#a67d865358127bef1f0011a23d5158a9f">CCoinsView::GetCoins</a></div><div class="ttdeci">virtual bool GetCoins(const uint256 &txid, CCoins &coins) const</div><div class="ttdoc">Retrieve the CCoins (unspent transaction outputs) for a given txid. </div><div class="ttdef"><b>Definition:</b> <a href="coins_8cpp_source.html#l00044">coins.cpp:44</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ad6d9966cdeb4b6586f7186e709b4e77e"><div class="ttname"><a href="classCTxMemPool.html#ad6d9966cdeb4b6586f7186e709b4e77e">CTxMemPool::lookup</a></div><div class="ttdeci">bool lookup(uint256 hash, CTransaction &result) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00869">txmempool.cpp:869</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a11dea05121ab8321e1d1f1a21ec5c9ac"><div class="ttname"><a href="classCTxMemPool.html#a11dea05121ab8321e1d1f1a21ec5c9ac">CTxMemPool::ClearPrioritisation</a></div><div class="ttdeci">void ClearPrioritisation(const uint256 hash)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00968">txmempool.cpp:968</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ab59b98a493b962027fdf71072d57a443"><div class="ttname"><a href="classCTxMemPool.html#ab59b98a493b962027fdf71072d57a443">CTxMemPool::mapSpentInserted</a></div><div class="ttdeci">mapSpentIndexInserted mapSpentInserted</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00435">txmempool.h:435</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewCache_html"><div class="ttname"><a href="classCCoinsViewCache.html">CCoinsViewCache</a></div><div class="ttdef"><b>Definition:</b> <a href="coins_8h_source.html#l00380">coins.h:380</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a8bf3b1d8436f9abc68f0c8391377df5d"><div class="ttname"><a href="classCTxMemPool.html#a8bf3b1d8436f9abc68f0c8391377df5d">CTxMemPool::ApplyDeltas</a></div><div class="ttdeci">void ApplyDeltas(const uint256 hash, double &dPriorityDelta, CAmount &nFeeDelta) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00957">txmempool.cpp:957</a></div></div>
|
|
<div class="ttc" id="amount_8h_html_a4eaf3a5239714d8c45b851527f7cb564"><div class="ttname"><a href="amount_8h.html#a4eaf3a5239714d8c45b851527f7cb564">CAmount</a></div><div class="ttdeci">int64_t CAmount</div><div class="ttdef"><b>Definition:</b> <a href="amount_8h_source.html#l00014">amount.h:14</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ad5ae2f4442200f4d80e7b3aa61ec0435"><div class="ttname"><a href="classCTxMemPool.html#ad5ae2f4442200f4d80e7b3aa61ec0435">CTxMemPool::getSpentIndex</a></div><div class="ttdeci">bool getSpentIndex(CSpentIndexKey &key, CSpentIndexValue &value)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00536">txmempool.cpp:536</a></div></div>
|
|
<div class="ttc" id="classCFeeRate_html"><div class="ttname"><a href="classCFeeRate.html">CFeeRate</a></div><div class="ttdef"><b>Definition:</b> <a href="amount_8h_source.html#l00036">amount.h:36</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a8b7a13b5289ab839d4460f41a7da9789"><div class="ttname"><a href="classCTxMemPool.html#a8b7a13b5289ab839d4460f41a7da9789">CTxMemPool::exists</a></div><div class="ttdeci">bool exists(uint256 hash) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00563">txmempool.h:563</a></div></div>
|
|
<div class="ttc" id="sync_8h_html_acd61d0cb3b49f367728193720014aed0"><div class="ttname"><a href="sync_8h.html#acd61d0cb3b49f367728193720014aed0">AssertLockHeld</a></div><div class="ttdeci">#define AssertLockHeld(cs)</div><div class="ttdef"><b>Definition:</b> <a href="sync_8h_source.html#l00096">sync.h:96</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_ad6809157651778ea15287394e3178124"><div class="ttname"><a href="classCTxMemPoolEntry.html#ad6809157651778ea15287394e3178124">CTxMemPoolEntry::lockPoints</a></div><div class="ttdeci">LockPoints lockPoints</div><div class="ttdoc">Used for determining the priority of the transaction for mining in a block. </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00092">txmempool.h:92</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html_acc6d4370b7b3942507647904043b181a"><div class="ttname"><a href="classCBlockPolicyEstimator.html#acc6d4370b7b3942507647904043b181a">CBlockPolicyEstimator::estimateSmartFee</a></div><div class="ttdeci">CFeeRate estimateSmartFee(int confTarget, int *answerFoundAtTarget, const CTxMemPool &pool)</div><div class="ttdef"><b>Definition:</b> <a href="fees_8cpp_source.html#l00506">fees.cpp:506</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a7a5b17b8cf4560cd681ef035880e3245"><div class="ttname"><a href="classCTxMemPool.html#a7a5b17b8cf4560cd681ef035880e3245">CTxMemPool::HasNoInputsOf</a></div><div class="ttdeci">bool HasNoInputsOf(const CTransaction &tx) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00974">txmempool.cpp:974</a></div></div>
|
|
<div class="ttc" id="namespacefix-copyright-headers_html_aed10e06fbf20b2e50f73ff2d61f59e45"><div class="ttname"><a href="namespacefix-copyright-headers.html#aed10e06fbf20b2e50f73ff2d61f59e45">fix-copyright-headers.n</a></div><div class="ttdeci">int n</div><div class="ttdef"><b>Definition:</b> <a href="fix-copyright-headers_8py_source.html#l00046">fix-copyright-headers.py:46</a></div></div>
|
|
<div class="ttc" id="classCCoins_html_a597a7cb8830fc29565918ce1823b2244"><div class="ttname"><a href="classCCoins.html#a597a7cb8830fc29565918ce1823b2244">CCoins::IsPruned</a></div><div class="ttdeci">bool IsPruned() const</div><div class="ttdef"><b>Definition:</b> <a href="coins_8h_source.html#l00251">coins.h:251</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ac7ee8c06837c7d2688e2d7e3d071bdbb"><div class="ttname"><a href="classCTxMemPool.html#ac7ee8c06837c7d2688e2d7e3d071bdbb">CTxMemPool::cs</a></div><div class="ttdeci">CCriticalSection cs</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00402">txmempool.h:402</a></div></div>
|
|
<div class="ttc" id="util_8h_html_afc02c0a4258fedfb316be612bb659ba8"><div class="ttname"><a href="util_8h.html#afc02c0a4258fedfb316be612bb659ba8">LogPrintf</a></div><div class="ttdeci">#define LogPrintf(...)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00098">util.h:98</a></div></div>
|
|
<div class="ttc" id="txmempool_8h_html"><div class="ttname"><a href="txmempool_8h.html">txmempool.h</a></div></div>
|
|
<div class="ttc" id="validation_8cpp_html_a7e254ea66e047c3d3ed0bedc5997fc4f"><div class="ttname"><a href="validation_8cpp.html#a7e254ea66e047c3d3ed0bedc5997fc4f">CheckFinalTx</a></div><div class="ttdeci">bool CheckFinalTx(const CTransaction &tx, int flags)</div><div class="ttdef"><b>Definition:</b> <a href="validation_8cpp_source.html#l00213">validation.cpp:213</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_aa3b42beec827c813a0c4b42e50615f5a"><div class="ttname"><a href="classCTxMemPool.html#aa3b42beec827c813a0c4b42e50615f5a">CTxMemPool::txiter</a></div><div class="ttdeci">indexed_transaction_set::nth_index< 0 >::type::iterator txiter</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00404">txmempool.h:404</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_af1878f46ec4c9609ea0b6c5bd96e2541"><div class="ttname"><a href="classCTxMemPool.html#af1878f46ec4c9609ea0b6c5bd96e2541">CTxMemPool::blockSinceLastRollingFeeBump</a></div><div class="ttdeci">bool blockSinceLastRollingFeeBump</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00370">txmempool.h:370</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_aa8ef89085a52247d95bafb17397608a3"><div class="ttname"><a href="classCTxMemPoolEntry.html#aa8ef89085a52247d95bafb17397608a3">CTxMemPoolEntry::nSizeWithDescendants</a></div><div class="ttdeci">uint64_t nSizeWithDescendants</div><div class="ttdoc">number of descendant transactions </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00100">txmempool.h:100</a></div></div>
|
|
<div class="ttc" id="classCTxIn_html_aed9312051a25380cbd7f123408ab7c20"><div class="ttname"><a href="classCTxIn.html#aed9312051a25380cbd7f123408ab7c20">CTxIn::prevout</a></div><div class="ttdeci">COutPoint prevout</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00061">transaction.h:61</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_aea6c845956f051442dac0a13975b2192"><div class="ttname"><a href="classCTxMemPool.html#aea6c845956f051442dac0a13975b2192">CTxMemPool::CalculateDescendants</a></div><div class="ttdeci">void CalculateDescendants(txiter it, setEntries &setDescendants)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00588">txmempool.cpp:588</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ac3336a567bb5cd890057482170e5553d"><div class="ttname"><a href="classCTxMemPool.html#ac3336a567bb5cd890057482170e5553d">CTxMemPool::GetMemPoolParents</a></div><div class="ttdeci">const setEntries & GetMemPoolParents(txiter entry) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01060">txmempool.cpp:1060</a></div></div>
|
|
<div class="ttc" id="serialize_8h_html_a48239e478ae730373d1984fe304ca025"><div class="ttname"><a href="serialize_8h.html#a48239e478ae730373d1984fe304ca025">GetSerializeSize</a></div><div class="ttdeci">unsigned int GetSerializeSize(char a, int, int=0)</div><div class="ttdef"><b>Definition:</b> <a href="serialize_8h_source.html#l00202">serialize.h:202</a></div></div>
|
|
<div class="ttc" id="structCSpentIndexValue_html"><div class="ttname"><a href="structCSpentIndexValue.html">CSpentIndexValue</a></div><div class="ttdef"><b>Definition:</b> <a href="spentindex_8h_source.html#l00040">spentindex.h:40</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a5e70f24dbd2361ec933bc4194e61ff38"><div class="ttname"><a href="classCTxMemPool.html#a5e70f24dbd2361ec933bc4194e61ff38">CTxMemPool::UpdateMinFee</a></div><div class="ttdeci">void UpdateMinFee(const CFeeRate &_minReasonableRelayFee)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01100">txmempool.cpp:1100</a></div></div>
|
|
<div class="ttc" id="classCCoins_html_a0acc5f3849c1c41386d9450a3ee3a3c8"><div class="ttname"><a href="classCCoins.html#a0acc5f3849c1c41386d9450a3ee3a3c8">CCoins::Spend</a></div><div class="ttdeci">bool Spend(uint32_t nPos)</div><div class="ttdoc">mark a vout spent </div><div class="ttdef"><b>Definition:</b> <a href="coins_8cpp_source.html#l00035">coins.cpp:35</a></div></div>
|
|
<div class="ttc" id="util_8h_html_aab1f837a2366f424bdc996fdf6352171"><div class="ttname"><a href="util_8h.html#aab1f837a2366f424bdc996fdf6352171">LogPrint</a></div><div class="ttdeci">static int LogPrint(const char *category, const char *format)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00126">util.h:126</a></div></div>
|
|
<div class="ttc" id="classCTransaction_html"><div class="ttname"><a href="classCTransaction.html">CTransaction</a></div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00210">transaction.h:210</a></div></div>
|
|
<div class="ttc" id="classCOutPoint_html"><div class="ttname"><a href="classCOutPoint.html">COutPoint</a></div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00015">transaction.h:15</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_aea14d073b24e31251465ac3c2279ee65"><div class="ttname"><a href="classCTxMemPool.html#aea14d073b24e31251465ac3c2279ee65">CTxMemPool::removeForBlock</a></div><div class="ttdeci">void removeForBlock(const std::vector< CTransaction > &vtx, unsigned int nBlockHeight, std::list< CTransaction > &conflicts, bool fCurrentEstimate=true)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00706">txmempool.cpp:706</a></div></div>
|
|
<div class="ttc" id="sync_8h_html_a911fe23f057c2fe5aad629162d6c99d0"><div class="ttname"><a href="sync_8h.html#a911fe23f057c2fe5aad629162d6c99d0">LOCK</a></div><div class="ttdeci">#define LOCK(cs)</div><div class="ttdef"><b>Definition:</b> <a href="sync_8h_source.html#l00168">sync.h:168</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a2deed4202061edf8b040a3f554417c20"><div class="ttname"><a href="classCTxMemPoolEntry.html#a2deed4202061edf8b040a3f554417c20">CTxMemPoolEntry::GetTx</a></div><div class="ttdeci">const CTransaction & GetTx() const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00110">txmempool.h:110</a></div></div>
|
|
<div class="ttc" id="classCFeeRate_html_a67a2711583d588edd3dfa2dba682f4ce"><div class="ttname"><a href="classCFeeRate.html#a67a2711583d588edd3dfa2dba682f4ce">CFeeRate::ToString</a></div><div class="ttdeci">std::string ToString() const</div><div class="ttdef"><b>Definition:</b> <a href="amount_8cpp_source.html#l00030">amount.cpp:30</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a4fcf05ad5f15a565c4b43c4b9f29906e"><div class="ttname"><a href="classCTxMemPool.html#a4fcf05ad5f15a565c4b43c4b9f29906e">CTxMemPool::DynamicMemoryUsage</a></div><div class="ttdeci">size_t DynamicMemoryUsage() const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01000">txmempool.cpp:1000</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a9cf8ed535f89c0a1332af6c15e4a2aa9"><div class="ttname"><a href="classCTxMemPool.html#a9cf8ed535f89c0a1332af6c15e4a2aa9">CTxMemPool::cachedInnerUsage</a></div><div class="ttdeci">uint64_t cachedInnerUsage</div><div class="ttdoc">sum of all mempool tx&#39; byte sizes </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00365">txmempool.h:365</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a0d073dc0cc608d0c466d2a077c713ccc"><div class="ttname"><a href="classCTxMemPool.html#a0d073dc0cc608d0c466d2a077c713ccc">CTxMemPool::mapAddress</a></div><div class="ttdeci">addressDeltaMap mapAddress</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00426">txmempool.h:426</a></div></div>
|
|
<div class="ttc" id="namespacetest__framework_1_1script_html_a9bd02d6caf0c4901bebad69c1cf4eca5"><div class="ttname"><a href="namespacetest__framework_1_1script.html#a9bd02d6caf0c4901bebad69c1cf4eca5">test_framework.script.long</a></div><div class="ttdeci">long</div><div class="ttdef"><b>Definition:</b> <a href="script_8py_source.html#l00024">script.py:24</a></div></div>
|
|
<div class="ttc" id="consensus_2validation_8h_html"><div class="ttname"><a href="consensus_2validation_8h.html">validation.h</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a6dba6bce4139392751321438a29b6b09"><div class="ttname"><a href="classCTxMemPool.html#a6dba6bce4139392751321438a29b6b09">CTxMemPool::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00745">txmempool.cpp:745</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_af9e1f3841f5d0834b6e0e7ff25648547"><div class="ttname"><a href="classCTxMemPoolEntry.html#af9e1f3841f5d0834b6e0e7ff25648547">CTxMemPoolEntry::CTxMemPoolEntry</a></div><div class="ttdeci">CTxMemPoolEntry(const CTransaction &_tx, const CAmount &_nFee, int64_t _nTime, double _entryPriority, unsigned int _entryHeight, bool poolHasNoInputsOf, CAmount _inChainInputValue, bool spendsCoinbase, unsigned int nSigOps, LockPoints lp)</div><div class="ttdoc">... and total fees (all including us) </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00023">txmempool.cpp:23</a></div></div>
|
|
<div class="ttc" id="classCFeeRate_html_ac772be79983433d442d6b871d2fb6e11"><div class="ttname"><a href="classCFeeRate.html#ac772be79983433d442d6b871d2fb6e11">CFeeRate::GetFeePerK</a></div><div class="ttdeci">CAmount GetFeePerK() const</div><div class="ttdef"><b>Definition:</b> <a href="amount_8h_source.html#l00047">amount.h:47</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a87623d672631b33a26e38810fa2d0006"><div class="ttname"><a href="classCTxMemPool.html#a87623d672631b33a26e38810fa2d0006">CTxMemPool::UpdateChildrenForRemoval</a></div><div class="ttdeci">void UpdateChildrenForRemoval(txiter entry)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00260">txmempool.cpp:260</a></div></div>
|
|
<div class="ttc" id="util_8h_html_af8985880cf4ef26df0a5aa2ffcb76662"><div class="ttname"><a href="util_8h.html#af8985880cf4ef26df0a5aa2ffcb76662">error</a></div><div class="ttdeci">static bool error(const char *format)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00131">util.h:131</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a1d31c97e6e69d8db56269bae13b6b16a"><div class="ttname"><a href="classCTxMemPoolEntry.html#a1d31c97e6e69d8db56269bae13b6b16a">CTxMemPoolEntry::SetDirty</a></div><div class="ttdeci">void SetDirty()</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00310">txmempool.cpp:310</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a8ba840e58bc02d95adad746491960dcd"><div class="ttname"><a href="classCTxMemPool.html#a8ba840e58bc02d95adad746491960dcd">CTxMemPool::ROLLING_FEE_HALFLIFE</a></div><div class="ttdeci">static const int ROLLING_FEE_HALFLIFE</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00377">txmempool.h:377</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ab30fadfa811829e79accca41da6a8328"><div class="ttname"><a href="classCTxMemPool.html#ab30fadfa811829e79accca41da6a8328">CTxMemPool::check</a></div><div class="ttdeci">void check(const CCoinsViewCache *pcoins) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00751">txmempool.cpp:751</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a25fcb552777ae6f36df9de3f4c23bad3"><div class="ttname"><a href="classCTxMemPoolEntry.html#a25fcb552777ae6f36df9de3f4c23bad3">CTxMemPoolEntry::nTxSize</a></div><div class="ttdeci">size_t nTxSize</div><div class="ttdoc">Cached to avoid expensive parent-transaction lookups. </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00081">txmempool.h:81</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewCache_html_a5b1abd71c95dc7be2523b9c28839ec29"><div class="ttname"><a href="classCCoinsViewCache.html#a5b1abd71c95dc7be2523b9c28839ec29">CCoinsViewCache::HaveInputs</a></div><div class="ttdeci">bool HaveInputs(const CTransaction &tx) const</div><div class="ttdoc">Check whether all prevouts of the transaction are present in the UTXO set represented by this view...</div><div class="ttdef"><b>Definition:</b> <a href="coins_8cpp_source.html#l00246">coins.cpp:246</a></div></div>
|
|
<div class="ttc" id="util_8h_html"><div class="ttname"><a href="util_8h.html">util.h</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_af543eb39d3cb3f5bbf8244f19f22ee28"><div class="ttname"><a href="classCTxMemPoolEntry.html#af543eb39d3cb3f5bbf8244f19f22ee28">CTxMemPoolEntry::nModSize</a></div><div class="ttdeci">size_t nModSize</div><div class="ttdoc">... and avoid recomputing tx size </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00082">txmempool.h:82</a></div></div>
|
|
<div class="ttc" id="validation_8cpp_html_a2b1fec98f6318f76274f831b0d894ca2"><div class="ttname"><a href="validation_8cpp.html#a2b1fec98f6318f76274f831b0d894ca2">TestLockPointValidity</a></div><div class="ttdeci">bool TestLockPointValidity(const LockPoints *lp)</div><div class="ttdef"><b>Definition:</b> <a href="validation_8cpp_source.html#l00328">validation.cpp:328</a></div></div>
|
|
<div class="ttc" id="classCCoinsView_html_ade3a65fc3f1b02baf7bebce630e4eba3"><div class="ttname"><a href="classCCoinsView.html#ade3a65fc3f1b02baf7bebce630e4eba3">CCoinsView::HaveCoins</a></div><div class="ttdeci">virtual bool HaveCoins(const uint256 &txid) const</div><div class="ttdef"><b>Definition:</b> <a href="coins_8cpp_source.html#l00045">coins.cpp:45</a></div></div>
|
|
<div class="ttc" id="classCScript_html_a0c3729c606d318923dc06f95d85a0971"><div class="ttname"><a href="classCScript.html#a0c3729c606d318923dc06f95d85a0971">CScript::IsPayToScriptHash</a></div><div class="ttdeci">bool IsPayToScriptHash() const</div><div class="ttdef"><b>Definition:</b> <a href="script_8cpp_source.html#l00238">script.cpp:238</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ab88e4013df24a814545aa2a142d907a8"><div class="ttname"><a href="classCTxMemPool.html#ab88e4013df24a814545aa2a142d907a8">CTxMemPool::removeUnchecked</a></div><div class="ttdeci">void removeUnchecked(txiter entry)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00565">txmempool.cpp:565</a></div></div>
|
|
<div class="ttc" id="timedata_8h_html"><div class="ttname"><a href="timedata_8h.html">timedata.h</a></div></div>
|
|
<div class="ttc" id="utilmoneystr_8cpp_html_a0043c9abedcbce2d7d1d2cacaf595c9e"><div class="ttname"><a href="utilmoneystr_8cpp.html#a0043c9abedcbce2d7d1d2cacaf595c9e">FormatMoney</a></div><div class="ttdeci">std::string FormatMoney(const CAmount &n)</div><div class="ttdef"><b>Definition:</b> <a href="utilmoneystr_8cpp_source.html#l00014">utilmoneystr.cpp:14</a></div></div>
|
|
<div class="ttc" id="validation_8cpp_html_ad6a438d8b190d5742cc471452da5d709"><div class="ttname"><a href="validation_8cpp.html#ad6a438d8b190d5742cc471452da5d709">CheckSequenceLocks</a></div><div class="ttdeci">bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints *lp, bool useExistingLockPoints)</div><div class="ttdef"><b>Definition:</b> <a href="validation_8cpp_source.html#l00346">validation.cpp:346</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a16884a575b85f500781477a487a9b1dd"><div class="ttname"><a href="classCTxMemPool.html#a16884a575b85f500781477a487a9b1dd">CTxMemPool::addAddressIndex</a></div><div class="ttdeci">void addAddressIndex(const CTxMemPoolEntry &entry, const CCoinsViewCache &view)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00426">txmempool.cpp:426</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_ae7579eae7d9d05bff7fad8c0e66c8627"><div class="ttname"><a href="classCTxMemPoolEntry.html#ae7579eae7d9d05bff7fad8c0e66c8627">CTxMemPoolEntry::inChainInputValue</a></div><div class="ttdeci">CAmount inChainInputValue</div><div class="ttdoc">Not dependent on any other txs when it entered the mempool. </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00088">txmempool.h:88</a></div></div>
|
|
<div class="ttc" id="classCTxOut_html_a25bf3f2f4befb22a6a0be45784fe57e2"><div class="ttname"><a href="classCTxOut.html#a25bf3f2f4befb22a6a0be45784fe57e2">CTxOut::scriptPubKey</a></div><div class="ttdeci">CScript scriptPubKey</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00137">transaction.h:137</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a8da3f55d23d335261338753b22e0171d"><div class="ttname"><a href="classCTxMemPool.html#a8da3f55d23d335261338753b22e0171d">CTxMemPool::setEntries</a></div><div class="ttdeci">std::set< txiter, CompareIteratorByHash > setEntries</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00410">txmempool.h:410</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a68c3b6c23f83b77a45616525c63a0a30"><div class="ttname"><a href="classCTxMemPool.html#a68c3b6c23f83b77a45616525c63a0a30">CTxMemPool::trackPackageRemoved</a></div><div class="ttdeci">void trackPackageRemoved(const CFeeRate &rate)</div><div class="ttdoc">minimum fee to get into the pool, decreases exponentially </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01108">txmempool.cpp:1108</a></div></div>
|
|
<div class="ttc" id="namespacememusage_html_ae8ade104f83bf4c608c282adc365bf90"><div class="ttname"><a href="namespacememusage.html#ae8ade104f83bf4c608c282adc365bf90">memusage::MallocUsage</a></div><div class="ttdeci">static size_t MallocUsage(size_t alloc)</div><div class="ttdef"><b>Definition:</b> <a href="memusage_8h_source.html#l00046">memusage.h:46</a></div></div>
|
|
<div class="ttc" id="classCTransaction_html_a001aa818efad11751db060dd447dc28b"><div class="ttname"><a href="classCTransaction.html#a001aa818efad11751db060dd447dc28b">CTransaction::CalculateModifiedSize</a></div><div class="ttdeci">unsigned int CalculateModifiedSize(unsigned int nTxSize=0) const</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8cpp_source.html#l00132">transaction.cpp:132</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a9da5719dfd04508342009bea9c752160"><div class="ttname"><a href="classCTxMemPoolEntry.html#a9da5719dfd04508342009bea9c752160">CTxMemPoolEntry::GetTime</a></div><div class="ttdeci">int64_t GetTime() const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00118">txmempool.h:118</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a09c360447dc81cbfe684246f40f5e889"><div class="ttname"><a href="classCTxMemPool.html#a09c360447dc81cbfe684246f40f5e889">CTxMemPool::mapLinks</a></div><div class="ttdeci">txlinksMap mapLinks</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00423">txmempool.h:423</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_ab5b85d9bd797a134072fe8706d6d7e7e"><div class="ttname"><a href="classCTxMemPoolEntry.html#ab5b85d9bd797a134072fe8706d6d7e7e">CTxMemPoolEntry::DynamicMemoryUsage</a></div><div class="ttdeci">size_t DynamicMemoryUsage() const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00123">txmempool.h:123</a></div></div>
|
|
<div class="ttc" id="classCCoinsView_html"><div class="ttname"><a href="classCCoinsView.html">CCoinsView</a></div><div class="ttdef"><b>Definition:</b> <a href="coins_8h_source.html#l00315">coins.h:315</a></div></div>
|
|
<div class="ttc" id="version_8h_html"><div class="ttname"><a href="version_8h.html">version.h</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a341709e31a39ce7a7a951a85c775c589"><div class="ttname"><a href="classCTxMemPool.html#a341709e31a39ce7a7a951a85c775c589">CTxMemPool::mapDeltas</a></div><div class="ttdeci">std::map< uint256, std::pair< double, CAmount > > mapDeltas</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00442">txmempool.h:442</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a5225c61b3c034a9920c77f0cadc438f0"><div class="ttname"><a href="classCTxMemPool.html#a5225c61b3c034a9920c77f0cadc438f0">CTxMemPool::getAddressIndex</a></div><div class="ttdeci">bool getAddressIndex(std::vector< std::pair< uint160, int > > &addresses, std::vector< std::pair< CMempoolAddressDeltaKey, CMempoolAddressDelta > > &results)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00470">txmempool.cpp:470</a></div></div>
|
|
<div class="ttc" id="classuint256_html"><div class="ttname"><a href="classuint256.html">uint256</a></div><div class="ttdef"><b>Definition:</b> <a href="uint256_8h_source.html#l00114">uint256.h:114</a></div></div>
|
|
<div class="ttc" id="classCTransaction_html_ad64447ea044ec850313696fc99412d95"><div class="ttname"><a href="classCTransaction.html#ad64447ea044ec850313696fc99412d95">CTransaction::vin</a></div><div class="ttdeci">const std::vector< CTxIn > vin</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00233">transaction.h:233</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_adad4f014c99cf9fc2f23e274cd0c2132"><div class="ttname"><a href="classCTxMemPoolEntry.html#adad4f014c99cf9fc2f23e274cd0c2132">CTxMemPoolEntry::GetModifiedFee</a></div><div class="ttdeci">int64_t GetModifiedFee() const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00122">txmempool.h:122</a></div></div>
|
|
<div class="ttc" id="instantx_8cpp_html_abc71256f703e47c9254093e32ed2994c"><div class="ttname"><a href="instantx_8cpp.html#abc71256f703e47c9254093e32ed2994c">mempool</a></div><div class="ttdeci">CTxMemPool mempool</div></div>
|
|
<div class="ttc" id="classCTxMemPool_html"><div class="ttname"><a href="classCTxMemPool.html">CTxMemPool</a></div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00357">txmempool.h:357</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a0f163f91b8590b86acd43b26438d7ee1"><div class="ttname"><a href="classCTxMemPool.html#a0f163f91b8590b86acd43b26438d7ee1">CTxMemPool::GetMemPoolChildren</a></div><div class="ttdeci">const setEntries & GetMemPoolChildren(txiter entry) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01068">txmempool.cpp:1068</a></div></div>
|
|
<div class="ttc" id="structCSpentIndexKey_html"><div class="ttname"><a href="structCSpentIndexKey.html">CSpentIndexKey</a></div><div class="ttdef"><b>Definition:</b> <a href="spentindex_8h_source.html#l00012">spentindex.h:12</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewMemPool_html_a2c5900448dc5570053060686ad1f014b"><div class="ttname"><a href="classCCoinsViewMemPool.html#a2c5900448dc5570053060686ad1f014b">CCoinsViewMemPool::HaveCoins</a></div><div class="ttdeci">bool HaveCoins(const uint256 &txid) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00996">txmempool.cpp:996</a></div></div>
|
|
<div class="ttc" id="structset__dirty_html"><div class="ttname"><a href="structset__dirty.html">set_dirty</a></div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00164">txmempool.h:164</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a81a7ea21c08c211363d56c0201c65089"><div class="ttname"><a href="classCTxMemPoolEntry.html#a81a7ea21c08c211363d56c0201c65089">CTxMemPoolEntry::nCountWithDescendants</a></div><div class="ttdeci">uint64_t nCountWithDescendants</div><div class="ttdoc">Track the height and time at which tx was final. </div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00099">txmempool.h:99</a></div></div>
|
|
<div class="ttc" id="classCAutoFile_html"><div class="ttname"><a href="classCAutoFile.html">CAutoFile</a></div><div class="ttdef"><b>Definition:</b> <a href="streams_8h_source.html#l00346">streams.h:346</a></div></div>
|
|
<div class="ttc" id="version_8h_html_a4e2497f7c9c4319adcaf945159ec63f4"><div class="ttname"><a href="version_8h.html#a4e2497f7c9c4319adcaf945159ec63f4">PROTOCOL_VERSION</a></div><div class="ttdeci">static const int PROTOCOL_VERSION</div><div class="ttdef"><b>Definition:</b> <a href="version_8h_source.html#l00013">version.h:13</a></div></div>
|
|
<div class="ttc" id="classCTransaction_html_a7efd1379de830341417c0bfa23a149aa"><div class="ttname"><a href="classCTransaction.html#a7efd1379de830341417c0bfa23a149aa">CTransaction::GetHash</a></div><div class="ttdeci">const uint256 & GetHash() const</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00262">transaction.h:262</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a93ee11ea2adc6021d5bf0842516222b4"><div class="ttname"><a href="classCTxMemPool.html#a93ee11ea2adc6021d5bf0842516222b4">CTxMemPool::UpdateChild</a></div><div class="ttdeci">void UpdateChild(txiter entry, txiter child, bool add)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01040">txmempool.cpp:1040</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_afdeeb2a36948b64dfa391e214e99e12e"><div class="ttname"><a href="classCTxMemPoolEntry.html#afdeeb2a36948b64dfa391e214e99e12e">CTxMemPoolEntry::nFee</a></div><div class="ttdeci">CAmount nFee</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00080">txmempool.h:80</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html_a52cc7162762f37f5a246dc7a16838aa9"><div class="ttname"><a href="classCBlockPolicyEstimator.html#a52cc7162762f37f5a246dc7a16838aa9">CBlockPolicyEstimator::removeTx</a></div><div class="ttdeci">void removeTx(uint256 hash)</div><div class="ttdef"><b>Definition:</b> <a href="fees_8cpp_source.html#l00285">fees.cpp:285</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a3ceb50a47dff1a60d36d036f54d239c5"><div class="ttname"><a href="classCTxMemPool.html#a3ceb50a47dff1a60d36d036f54d239c5">CTxMemPool::rollingMinimumFeeRate</a></div><div class="ttdeci">double rollingMinimumFeeRate</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00371">txmempool.h:371</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a2c4f1513000ff34c3fe341e6674b2bd9"><div class="ttname"><a href="classCTxMemPool.html#a2c4f1513000ff34c3fe341e6674b2bd9">CTxMemPool::addSpentIndex</a></div><div class="ttdeci">void addSpentIndex(const CTxMemPoolEntry &entry, const CCoinsViewCache &view)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00500">txmempool.cpp:500</a></div></div>
|
|
<div class="ttc" id="consensus_8h_html"><div class="ttname"><a href="consensus_8h.html">consensus.h</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a251f595b6527be005634574ce5d01f70"><div class="ttname"><a href="classCTxMemPool.html#a251f595b6527be005634574ce5d01f70">CTxMemPool::WriteFeeEstimates</a></div><div class="ttdeci">bool WriteFeeEstimates(CAutoFile &fileout) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00900">txmempool.cpp:900</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_ad6142b7cd3a58dae6cdaf03551c2f989"><div class="ttname"><a href="classCTxMemPool.html#ad6142b7cd3a58dae6cdaf03551c2f989">CTxMemPool::pruneSpent</a></div><div class="ttdeci">void pruneSpent(const uint256 &hash, CCoins &coins)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00347">txmempool.cpp:347</a></div></div>
|
|
<div class="ttc" id="classuint160_html"><div class="ttname"><a href="classuint160.html">uint160</a></div><div class="ttdef"><b>Definition:</b> <a href="uint256_8h_source.html#l00102">uint256.h:102</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a232651541c3393c81153ffc289e7b71d"><div class="ttname"><a href="classCTxMemPool.html#a232651541c3393c81153ffc289e7b71d">CTxMemPool::GetMinFee</a></div><div class="ttdeci">CFeeRate GetMinFee(size_t sizelimit) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01076">txmempool.cpp:1076</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html_a3d6a47569d0677f8c40a6a170e8abf4d"><div class="ttname"><a href="classCBlockPolicyEstimator.html#a3d6a47569d0677f8c40a6a170e8abf4d">CBlockPolicyEstimator::Read</a></div><div class="ttdeci">void Read(CAutoFile &filein)</div><div class="ttdef"><b>Definition:</b> <a href="fees_8cpp_source.html#l00573">fees.cpp:573</a></div></div>
|
|
<div class="ttc" id="classCTransaction_html_a708645274ddfd83829315ffe5c7c5c3e"><div class="ttname"><a href="classCTransaction.html#a708645274ddfd83829315ffe5c7c5c3e">CTransaction::vout</a></div><div class="ttdeci">const std::vector< CTxOut > vout</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00234">transaction.h:234</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a2d04be1a3e144d466d45a5f1ec48f62c"><div class="ttname"><a href="classCTxMemPool.html#a2d04be1a3e144d466d45a5f1ec48f62c">CTxMemPool::_clear</a></div><div class="ttdeci">void _clear()</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00732">txmempool.cpp:732</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html_a4dbf4773f292c71c51cd17b7eb67dad0"><div class="ttname"><a href="classCBlockPolicyEstimator.html#a4dbf4773f292c71c51cd17b7eb67dad0">CBlockPolicyEstimator::processBlock</a></div><div class="ttdeci">void processBlock(unsigned int nBlockHeight, std::vector< CTxMemPoolEntry > &entries, bool fCurrentEstimate)</div><div class="ttdef"><b>Definition:</b> <a href="fees_8cpp_source.html#l00434">fees.cpp:434</a></div></div>
|
|
<div class="ttc" id="classprevector_html_aa9210cbe708412a70868d6e0bca844c9"><div class="ttname"><a href="classprevector.html#aa9210cbe708412a70868d6e0bca844c9">prevector::begin</a></div><div class="ttdeci">iterator begin()</div><div class="ttdef"><b>Definition:</b> <a href="prevector_8h_source.html#l00270">prevector.h:270</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewMemPool_html_aab9a206c304acec322fddf646c7bafb9"><div class="ttname"><a href="classCCoinsViewMemPool.html#aab9a206c304acec322fddf646c7bafb9">CCoinsViewMemPool::CCoinsViewMemPool</a></div><div class="ttdeci">CCoinsViewMemPool(CCoinsView *baseIn, CTxMemPool &mempoolIn)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00982">txmempool.cpp:982</a></div></div>
|
|
<div class="ttc" id="namespacememusage_html_adb94a858deacb691d493a604f572a9a9"><div class="ttname"><a href="namespacememusage.html#adb94a858deacb691d493a604f572a9a9">memusage::IncrementalDynamicUsage</a></div><div class="ttdeci">static size_t IncrementalDynamicUsage(const std::set< X, Y > &s)</div><div class="ttdef"><b>Definition:</b> <a href="memusage_8h_source.html#l00092">memusage.h:92</a></div></div>
|
|
<div class="ttc" id="core__memusage_8h_html_a18e1e611662fcad8ad04ad0a85e84d08"><div class="ttname"><a href="core__memusage_8h.html#a18e1e611662fcad8ad04ad0a85e84d08">RecursiveDynamicUsage</a></div><div class="ttdeci">static size_t RecursiveDynamicUsage(const CScript &script)</div><div class="ttdef"><b>Definition:</b> <a href="core__memusage_8h_source.html#l00012">core_memusage.h:12</a></div></div>
|
|
<div class="ttc" id="structCMempoolAddressDelta_html"><div class="ttname"><a href="structCMempoolAddressDelta.html">CMempoolAddressDelta</a></div><div class="ttdef"><b>Definition:</b> <a href="addressindex_8h_source.html#l00012">addressindex.h:12</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a8b320073dcb7010fbd19b100c8e13e57"><div class="ttname"><a href="classCTxMemPoolEntry.html#a8b320073dcb7010fbd19b100c8e13e57">CTxMemPoolEntry::tx</a></div><div class="ttdeci">CTransaction tx</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00079">txmempool.h:79</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a189d5dbafa6e955524692c0743dc0e0b"><div class="ttname"><a href="classCTxMemPoolEntry.html#a189d5dbafa6e955524692c0743dc0e0b">CTxMemPoolEntry::GetPriority</a></div><div class="ttdeci">double GetPriority(unsigned int currentHeight) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00050">txmempool.cpp:50</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a1a0a00279c941051af1b74c5ebeac40d"><div class="ttname"><a href="classCTxMemPool.html#a1a0a00279c941051af1b74c5ebeac40d">CTxMemPool::PrioritiseTransaction</a></div><div class="ttdeci">void PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, const CAmount &nFeeDelta)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00934">txmempool.cpp:934</a></div></div>
|
|
<div class="ttc" id="random_8h_html"><div class="ttname"><a href="random_8h.html">random.h</a></div></div>
|
|
<div class="ttc" id="txmempool_8h_html_ac18cc9fcf96dcd34beef99424c12b268"><div class="ttname"><a href="txmempool_8h.html#ac18cc9fcf96dcd34beef99424c12b268">MEMPOOL_HEIGHT</a></div><div class="ttdeci">static const unsigned int MEMPOOL_HEIGHT</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00040">txmempool.h:40</a></div></div>
|
|
<div class="ttc" id="utiltime_8cpp_html_a46fac5fba8ba905b5f9acb364f5d8c6f"><div class="ttname"><a href="utiltime_8cpp.html#a46fac5fba8ba905b5f9acb364f5d8c6f">GetTime</a></div><div class="ttdeci">int64_t GetTime()</div><div class="ttdoc">For unit testing. </div><div class="ttdef"><b>Definition:</b> <a href="utiltime_8cpp_source.html#l00020">utiltime.cpp:20</a></div></div>
|
|
<div class="ttc" id="namespaceextract__strings__qt_html_ab8166b91ad54a98ce8450593d2a3d827"><div class="ttname"><a href="namespaceextract__strings__qt.html#ab8166b91ad54a98ce8450593d2a3d827">extract_strings_qt.out</a></div><div class="ttdeci">out</div><div class="ttdef"><b>Definition:</b> <a href="extract__strings__qt_8py_source.html#l00056">extract_strings_qt.py:56</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a32dd66c128330aed86865c8a61857c6c"><div class="ttname"><a href="classCTxMemPool.html#a32dd66c128330aed86865c8a61857c6c">CTxMemPool::estimateFee</a></div><div class="ttdeci">CFeeRate estimateFee(int nBlocks) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00878">txmempool.cpp:878</a></div></div>
|
|
<div class="ttc" id="validation_8cpp_html_acb54672aa2ce74f5068a5cf660432b67"><div class="ttname"><a href="validation_8cpp.html#acb54672aa2ce74f5068a5cf660432b67">UpdateCoins</a></div><div class="ttdeci">void UpdateCoins(const CTransaction &tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight)</div><div class="ttdef"><b>Definition:</b> <a href="validation_8cpp_source.html#l01427">validation.cpp:1427</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html"><div class="ttname"><a href="classCBlockPolicyEstimator.html">CBlockPolicyEstimator</a></div><div class="ttdef"><b>Definition:</b> <a href="fees_8h_source.html#l00218">fees.h:218</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_af4d48ac0d6d62e7044ba21a45709f743"><div class="ttname"><a href="classCTxMemPool.html#af4d48ac0d6d62e7044ba21a45709f743">CTxMemPool::minerPolicyEstimator</a></div><div class="ttdeci">CBlockPolicyEstimator * minerPolicyEstimator</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00362">txmempool.h:362</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_acf12e024f4d6d5c0437227bc419c28fb"><div class="ttname"><a href="classCTxMemPool.html#acf12e024f4d6d5c0437227bc419c28fb">CTxMemPool::removeForReorg</a></div><div class="ttdeci">void removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00649">txmempool.cpp:649</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewMemPool_html_a7a3870fc65376cb311a0b3abb28fec10"><div class="ttname"><a href="classCCoinsViewMemPool.html#a7a3870fc65376cb311a0b3abb28fec10">CCoinsViewMemPool::mempool</a></div><div class="ttdeci">CTxMemPool & mempool</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00641">txmempool.h:641</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_abed0125e15673d8ad9daec4309f8d513"><div class="ttname"><a href="classCTxMemPool.html#abed0125e15673d8ad9daec4309f8d513">CTxMemPool::RemoveStaged</a></div><div class="ttdeci">void RemoveStaged(setEntries &stage)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01006">txmempool.cpp:1006</a></div></div>
|
|
<div class="ttc" id="clientversion_8h_html_a9697b803a256a637d532f292442c749c"><div class="ttname"><a href="clientversion_8h.html#a9697b803a256a637d532f292442c749c">CLIENT_VERSION</a></div><div class="ttdeci">static const int CLIENT_VERSION</div><div class="ttdef"><b>Definition:</b> <a href="clientversion_8h_source.html#l00054">clientversion.h:54</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html_a476fd39364402e84d3740fb2b52ba23d"><div class="ttname"><a href="classCBlockPolicyEstimator.html#a476fd39364402e84d3740fb2b52ba23d">CBlockPolicyEstimator::Write</a></div><div class="ttdeci">void Write(CAutoFile &fileout)</div><div class="ttdef"><b>Definition:</b> <a href="fees_8cpp_source.html#l00566">fees.cpp:566</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_aca7e15dfa82ccc9ab190b7c45d2c8d47"><div class="ttname"><a href="classCTxMemPool.html#aca7e15dfa82ccc9ab190b7c45d2c8d47">CTxMemPool::UpdateForDescendants</a></div><div class="ttdeci">bool UpdateForDescendants(txiter updateIt, int maxDescendantsToVisit, cacheMap &cachedDescendants, const std::set< uint256 > &setExclude)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00073">txmempool.cpp:73</a></div></div>
|
|
<div class="ttc" id="classCOutPoint_html_af131c7194a660558b0ff158f4efa7a28"><div class="ttname"><a href="classCOutPoint.html#af131c7194a660558b0ff158f4efa7a28">COutPoint::hash</a></div><div class="ttdeci">uint256 hash</div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00018">transaction.h:18</a></div></div>
|
|
<div class="ttc" id="classCTxMemPoolEntry_html_a706ebb6556ae83ced50449b5839d396c"><div class="ttname"><a href="classCTxMemPoolEntry.html#a706ebb6556ae83ced50449b5839d396c">CTxMemPoolEntry::UpdateState</a></div><div class="ttdeci">void UpdateState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00317">txmempool.cpp:317</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_a225378304025c093d2dc5fcb754ade3b"><div class="ttname"><a href="classCTxMemPool.html#a225378304025c093d2dc5fcb754ade3b">CTxMemPool::estimatePriority</a></div><div class="ttdeci">double estimatePriority(int nBlocks) const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00888">txmempool.cpp:888</a></div></div>
|
|
<div class="ttc" id="clientversion_8h_html"><div class="ttname"><a href="clientversion_8h.html">clientversion.h</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_aab557615eb380db41237382bab239f7c"><div class="ttname"><a href="classCTxMemPool.html#aab557615eb380db41237382bab239f7c">CTxMemPool::addUnchecked</a></div><div class="ttdeci">bool addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry, bool fCurrentEstimate=true)</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l01030">txmempool.cpp:1030</a></div></div>
|
|
<div class="ttc" id="classCTxMemPool_html_afd2a709a0e6cb34a57ff2f9fd0774e6c"><div class="ttname"><a href="classCTxMemPool.html#afd2a709a0e6cb34a57ff2f9fd0774e6c">CTxMemPool::GetTransactionsUpdated</a></div><div class="ttdeci">unsigned int GetTransactionsUpdated() const</div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8cpp_source.html#l00360">txmempool.cpp:360</a></div></div>
|
|
<div class="ttc" id="classCBlockPolicyEstimator_html_adcaa52e6fdabbf8b0907bb5521aaa4f9"><div class="ttname"><a href="classCBlockPolicyEstimator.html#adcaa52e6fdabbf8b0907bb5521aaa4f9">CBlockPolicyEstimator::estimatePriority</a></div><div class="ttdeci">double estimatePriority(int confTarget)</div><div class="ttdef"><b>Definition:</b> <a href="fees_8cpp_source.html#l00533">fees.cpp:533</a></div></div>
|
|
<div class="ttc" id="namespaceextract__strings__qt_html_a1b7a78cde0039f63310f11692b713dca"><div class="ttname"><a href="namespaceextract__strings__qt.html#a1b7a78cde0039f63310f11692b713dca">extract_strings_qt.key</a></div><div class="ttdeci">key</div><div class="ttdef"><b>Definition:</b> <a href="extract__strings__qt_8py_source.html#l00073">extract_strings_qt.py:73</a></div></div>
|
|
<div class="ttc" id="classCCoins_html_af7396dfad71367de46f21cf92e2c70ab"><div class="ttname"><a href="classCCoins.html#af7396dfad71367de46f21cf92e2c70ab">CCoins::nHeight</a></div><div class="ttdeci">int nHeight</div><div class="ttdoc">at which height this transaction was included in the active block chain </div><div class="ttdef"><b>Definition:</b> <a href="coins_8h_source.html#l00083">coins.h:83</a></div></div>
|
|
<div class="ttc" id="fees_8h_html"><div class="ttname"><a href="fees_8h.html">fees.h</a></div></div>
|
|
<div class="ttc" id="structupdate__descendant__state_html"><div class="ttname"><a href="structupdate__descendant__state.html">update_descendant_state</a></div><div class="ttdef"><b>Definition:</b> <a href="txmempool_8h_source.html#l00149">txmempool.h:149</a></div></div>
|
|
<div class="ttc" id="namespacerpcuser_html_a637791b4450c02d511291cd297ce12df"><div class="ttname"><a href="namespacerpcuser.html#a637791b4450c02d511291cd297ce12df">rpcuser.result</a></div><div class="ttdeci">result</div><div class="ttdef"><b>Definition:</b> <a href="rpcuser_8py_source.html#l00037">rpcuser.py:37</a></div></div>
|
|
<div class="ttc" id="classCCoinsViewCache_html_a8e5341e8b01233949d6170dd4d1fd75d"><div class="ttname"><a href="classCCoinsViewCache.html#a8e5341e8b01233949d6170dd4d1fd75d">CCoinsViewCache::AccessCoins</a></div><div class="ttdeci">const CCoins * AccessCoins(const uint256 &txid) const</div><div class="ttdef"><b>Definition:</b> <a href="coins_8cpp_source.html#l00129">coins.cpp:129</a></div></div>
|
|
<div class="ttc" id="namespaceextract__strings__qt_html_ad0d16bc882e7eb961f7284eb6b3ec0a2"><div class="ttname"><a href="namespaceextract__strings__qt.html#ad0d16bc882e7eb961f7284eb6b3ec0a2">extract_strings_qt.child</a></div><div class="ttdeci">child</div><div class="ttdef"><b>Definition:</b> <a href="extract__strings__qt_8py_source.html#l00055">extract_strings_qt.py:55</a></div></div>
|
|
<div class="ttc" id="classCTxOut_html"><div class="ttname"><a href="classCTxOut.html">CTxOut</a></div><div class="ttdef"><b>Definition:</b> <a href="transaction_8h_source.html#l00133">transaction.h:133</a></div></div>
|
|
</div><!-- fragment --></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="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="txmempool_8cpp.html">txmempool.cpp</a></li>
|
|
<li class="footer">Generated on Thu Dec 14 2017 13:15:09 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>
|