mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
578 lines
115 KiB
HTML
578 lines
115 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>rippled: Database.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="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="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">rippled
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<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>
|
|
<!-- 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 id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_df9c78dcf3f59a33b12284f95992a64b.html">ripple</a></li><li class="navelem"><a class="el" href="dir_ceb6d1bc218d15504336f945ff1322da.html">nodestore</a></li><li class="navelem"><a class="el" href="dir_1eae1e3c362aa357dbf8694343222a03.html">impl</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">Database.cpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//------------------------------------------------------------------------------</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> This file is part of rippled: https://github.com/ripple/rippled</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Copyright (c) 2012, 2013 Ripple Labs Inc.</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> Permission to use, copy, modify, and/or distribute this software for any</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> purpose with or without fee is hereby granted, provided that the above</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> copyright notice and this permission notice appear in all copies.</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">//==============================================================================</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  </div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <ripple/app/ledger/Ledger.h></span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <ripple/basics/chrono.h></span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <ripple/beast/core/CurrentThreadName.h></span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <ripple/nodestore/Database.h></span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <ripple/protocol/HashPrefix.h></span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  </div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">namespace </span>NodeStore {</div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  </div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#a825a775a2e46e587e5dc02c4e619625a"> 29</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#acd7da6cb652b11ecd6b40fb79d6f8b2f">Database::Database</a>(</div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> name,</div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <a class="code" href="classripple_1_1Stoppable.html">Stoppable</a>& parent,</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <a class="code" href="classripple_1_1NodeStore_1_1Scheduler.html">Scheduler</a>& scheduler,</div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordtype">int</span> readThreads,</div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span>& config,</div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="code" href="classbeast_1_1Journal.html">beast::Journal</a> journal)</div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  : <a class="code" href="classripple_1_1Stoppable.html">Stoppable</a>(name, parent.getRoot())</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  , j_(journal)</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  , scheduler_(scheduler)</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  , earliestLedgerSeq_(</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <a class="code" href="namespaceripple.html#a104985c6e3067babe99aca6bbc51ba5d">get</a><<a class="code" href="namespacestd.html">std</a>::uint32_t>(config, <span class="stringliteral">"earliest_seq"</span>, <a class="code" href="namespaceripple.html#a2c550f167665d94744b297523ff07de2">XRP_LEDGER_EARLIEST_SEQ</a>))</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1NodeStore_1_1Database.html#aa59aca23acd391245f0b403df74ac8be">earliestLedgerSeq_</a> < 1)</div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  Throw<std::runtime_error>(<span class="stringliteral">"Invalid earliest_seq"</span>);</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">while</span> (readThreads-- > 0)</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#ad769f906ab9351dc6c4fa166b3937e1c">readThreads_</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(&<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a7c4180512ff87a967de8091a019dc9f9">Database::threadEntry</a>, <span class="keyword">this</span>);</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"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#a2e1cec1845007e7037214306b2c4bf45"> 49</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a2e1cec1845007e7037214306b2c4bf45">Database::~Database</a>()</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> {</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="comment">// NOTE!</span></div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="comment">// Any derived class should call the stopThreads() method in its</span></div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="comment">// destructor. Otherwise, occasionally, the derived class may</span></div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="comment">// crash during shutdown when its members are accessed by one of</span></div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="comment">// these threads after the derived class is destroyed but before</span></div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="comment">// this base class is destroyed.</span></div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#ab8f5eeb95d1166af47301d041b3063f2">stopThreads</a>();</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> }</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  </div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#a332e25e0d08606b9eb501b9f83755dce"> 61</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a332e25e0d08606b9eb501b9f83755dce">Database::waitReads</a>()</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> {</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/unique_lock.html">std::unique_lock<std::mutex></a> lock(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a06fbf66d1f34a6162a17daf72e71eba9">readLock_</a>);</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="comment">// Wake in two generations.</span></div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="comment">// Each generation is a full pass over the space.</span></div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="comment">// If we're in generation N and you issue a request,</span></div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="comment">// that request will only be done during generation N</span></div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="comment">// if it happens to land after where the pass currently is.</span></div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="comment">// But, if not, it will definitely be done during generation</span></div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="comment">// N+1 since the request was in the table before that pass</span></div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="comment">// even started. So when you reach generation N+2,</span></div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="comment">// you know the request is done.</span></div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a> <span class="keyword">const</span> wakeGen = <a class="code" href="classripple_1_1NodeStore_1_1Database.html#adb20e114f931da87b2d25e8e1b1fe4ca">readGen_</a> + 2;</div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">while</span> (!<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0056efda3dfb01158eece68b05c98c2d">readShut_</a> && !<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a20ecfe20206f927e8e6d6631053bd60d">read_</a>.empty() && (<a class="code" href="classripple_1_1NodeStore_1_1Database.html#adb20e114f931da87b2d25e8e1b1fe4ca">readGen_</a> < wakeGen))</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a6af5c13598349c55003f520267e514c1">readGenCondVar_</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/condition_variable/wait.html">wait</a>(lock);</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> }</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#a0923c37ede6c7ffeca02f59f566cf588"> 79</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0923c37ede6c7ffeca02f59f566cf588">Database::onStop</a>()</div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> {</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="comment">// After stop time we can no longer use the JobQueue for background</span></div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="comment">// reads. Join the background read threads.</span></div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#ab8f5eeb95d1166af47301d041b3063f2">stopThreads</a>();</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> }</div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  </div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#ae84b30410af69ec7e7adcdb6265a4af8"> 87</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#ae84b30410af69ec7e7adcdb6265a4af8">Database::onChildrenStopped</a>()</div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> {</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <a class="code" href="classripple_1_1Stoppable.html#a65a95f9c14637491df60d3a07518fa09">stopped</a>();</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> }</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  </div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#ab8f5eeb95d1166af47301d041b3063f2"> 93</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#ab8f5eeb95d1166af47301d041b3063f2">Database::stopThreads</a>()</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> {</div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  {</div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a06fbf66d1f34a6162a17daf72e71eba9">readLock_</a>);</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0056efda3dfb01158eece68b05c98c2d">readShut_</a>) <span class="comment">// Only stop threads once.</span></div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  </div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0056efda3dfb01158eece68b05c98c2d">readShut_</a> = <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a438af3c0eba7891bb79d5c5dcb902556">readCondVar_</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/condition_variable/notify_all.html">notify_all</a>();</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a6af5c13598349c55003f520267e514c1">readGenCondVar_</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/condition_variable/notify_all.html">notify_all</a>();</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">for</span> (<span class="keyword">auto</span>& e : <a class="code" href="classripple_1_1NodeStore_1_1Database.html#ad769f906ab9351dc6c4fa166b3937e1c">readThreads_</a>)</div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  e.join();</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> }</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  </div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#a693ce912541163f3c6d6eed5bc0ece3e"> 110</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a44b4880cc7028c8171c4a901381ba21e">Database::asyncFetch</a>(</div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>& hash,</div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq,</div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a><<a class="code" href="classripple_1_1TaggedCache.html">TaggedCache<uint256, NodeObject></a>> <span class="keyword">const</span>& pCache,</div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a><<a class="code" href="classripple_1_1KeyCache.html">KeyCache<uint256></a>> <span class="keyword">const</span>& nCache)</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">// Post a read</span></div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a> lock(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a06fbf66d1f34a6162a17daf72e71eba9">readLock_</a>);</div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a20ecfe20206f927e8e6d6631053bd60d">read_</a>.emplace(hash, <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a>(seq, pCache, nCache)).second)</div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a438af3c0eba7891bb79d5c5dcb902556">readCondVar_</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/condition_variable/notify_one.html">notify_one</a>();</div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> }</div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  </div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<NodeObject></a></div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#a109754c4bed6627ba778fa84244177a4"> 123</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a109754c4bed6627ba778fa84244177a4">Database::fetchInternal</a>(<a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>& hash, <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Backend></a> backend)</div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> {</div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<NodeObject></a> nObj;</div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <a class="code" href="namespaceripple_1_1NodeStore.html#af127c2e4fc73b5d35647147ef45b350c">Status</a> status;</div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">try</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>  status = backend->fetch(hash.<a class="code" href="classripple_1_1base__uint.html#a2ffd09234d574e5554c5d84199a9f287">begin</a>(), &nObj);</div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  }</div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">catch</span> (<a class="codeRef" href="http://en.cppreference.com/w/cpp/error/exception.html">std::exception</a> <span class="keyword">const</span>& e)</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>  JLOG(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0d7c3d303adce36199b2c67c4df8a2de">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>()) << <span class="stringliteral">"Exception, "</span> << e.<a class="codeRef" href="http://en.cppreference.com/w/cpp/error/exception/what.html">what</a>();</div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <a class="code" href="namespaceripple.html#ad99788f1aca6ce31a1fe8365eee1bba3">Rethrow</a>();</div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  }</div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  </div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">switch</span> (status)</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>  <span class="keywordflow">case</span> <a class="code" href="namespaceripple_1_1NodeStore.html#af127c2e4fc73b5d35647147ef45b350ca852178e08b8b1f2eb19fd271e63830ef">ok</a>:</div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  ++<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a89497b9b4c5530b58040931489015d30">fetchHitCount_</a>;</div>
|
|
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">if</span> (nObj)</div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a04150d23aa2acaf016d4ca40bd10804a">fetchSz_</a> += nObj->getData().size();</div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">case</span> <a class="code" href="namespaceripple_1_1NodeStore.html#af127c2e4fc73b5d35647147ef45b350cafa8056068943efe12560207a8a503db8">notFound</a>:</div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">case</span> <a class="code" href="namespaceripple_1_1NodeStore.html#af127c2e4fc73b5d35647147ef45b350ca915a2fc67fa0633b4995f8c1e4d54bdf">dataCorrupt</a>:</div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="comment">// VFALCO TODO Deal with encountering corrupt data!</span></div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  JLOG(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0d7c3d303adce36199b2c67c4df8a2de">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>()) << <span class="stringliteral">"Corrupt NodeObject #"</span> << hash;</div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">default</span>:</div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  JLOG(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0d7c3d303adce36199b2c67c4df8a2de">j_</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Unknown status="</span> << status;</div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordflow">break</span>;</div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  }</div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordflow">return</span> nObj;</div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> }</div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  </div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#af885d9fe877259a258481f0df20697cd"> 158</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#af885d9fe877259a258481f0df20697cd">Database::importInternal</a>(<a class="code" href="classripple_1_1NodeStore_1_1Backend.html">Backend</a>& dstBackend, <a class="code" href="classripple_1_1NodeStore_1_1Database.html">Database</a>& srcDB)</div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> {</div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">Batch</a> b;</div>
|
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  b.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(<a class="code" href="namespaceripple_1_1NodeStore.html#a462140731267cdb1df0c7759a9a31512a3e7cbb590a2149da2328925f4ac5978a">batchWritePreallocationSize</a>);</div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  srcDB.<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a2b5174a0ffb315030b96815d6ac86eaf">for_each</a>([&](<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<NodeObject></a> nObj) {</div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  assert(nObj);</div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordflow">if</span> (!nObj) <span class="comment">// This should never happen</span></div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keywordflow">return</span>;</div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  </div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  ++<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a743a610ca48e4585fc4fecda6c52d311">storeCount_</a>;</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a5b5b290bf11d892a23a53e3e3beb2cfe">storeSz_</a> += nObj->getData().size();</div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  </div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  b.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(nObj);</div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">if</span> (b.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() >= <a class="code" href="namespaceripple_1_1NodeStore.html#a462140731267cdb1df0c7759a9a31512a3e7cbb590a2149da2328925f4ac5978a">batchWritePreallocationSize</a>)</div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  {</div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  dstBackend.<a class="code" href="classripple_1_1NodeStore_1_1Backend.html#acb1f22b4101841e695477646c95376a7">storeBatch</a>(b);</div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  b.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/clear.html">clear</a>();</div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  b.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(<a class="code" href="namespaceripple_1_1NodeStore.html#a462140731267cdb1df0c7759a9a31512a3e7cbb590a2149da2328925f4ac5978a">batchWritePreallocationSize</a>);</div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  }</div>
|
|
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  });</div>
|
|
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">if</span> (!b.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>())</div>
|
|
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  dstBackend.<a class="code" href="classripple_1_1NodeStore_1_1Backend.html#acb1f22b4101841e695477646c95376a7">storeBatch</a>(b);</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> <span class="comment">// Perform a fetch and report the time it took</span></div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<NodeObject></a></div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#a1eb657a3b7c4b409f9640b82c11ed89e"> 184</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a1eb657a3b7c4b409f9640b82c11ed89e">Database::doFetch</a>(</div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>& hash,</div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq,</div>
|
|
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="code" href="classripple_1_1TaggedCache.html">TaggedCache<uint256, NodeObject></a>& pCache,</div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="code" href="classripple_1_1KeyCache.html">KeyCache<uint256></a>& nCache,</div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordtype">bool</span> isAsync)</div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> {</div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <a class="code" href="structripple_1_1NodeStore_1_1FetchReport.html">FetchReport</a> report;</div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  report.<a class="code" href="structripple_1_1NodeStore_1_1FetchReport.html#a989fdb05f6f07b1c34ea63a3524d6029">isAsync</a> = isAsync;</div>
|
|
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  report.<a class="code" href="structripple_1_1NodeStore_1_1FetchReport.html#a3063c18d4ab5927e8a3cb129745a2ca3">wentToDisk</a> = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  </div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keyword">using namespace </span><a class="codeRef" href="http://en.cppreference.com/w/namespacestd_1_1chrono.html">std::chrono</a>;</div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keyword">auto</span> <span class="keyword">const</span> before = steady_clock::now();</div>
|
|
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  </div>
|
|
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="comment">// See if the object already exists in the cache</span></div>
|
|
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keyword">auto</span> nObj = pCache.<a class="code" href="classripple_1_1TaggedCache.html#a8b19cf9b9885ddeceb282d5fb6757ce5">fetch</a>(hash);</div>
|
|
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordflow">if</span> (!nObj && !nCache.<a class="code" href="classripple_1_1KeyCache.html#ad93a1bca0da205d937a9b9781ffab7c9">touch_if_exists</a>(hash))</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="comment">// Try the database(s)</span></div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  report.<a class="code" href="structripple_1_1NodeStore_1_1FetchReport.html#a3063c18d4ab5927e8a3cb129745a2ca3">wentToDisk</a> = <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  nObj = <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a7a4466bf521bdf460d959227e0f08c52">fetchFrom</a>(hash, seq);</div>
|
|
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  ++<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a53935eeab8c4e74a956fd3d70c85a35b">fetchTotalCount_</a>;</div>
|
|
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">if</span> (!nObj)</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>  <span class="comment">// Just in case a write occurred</span></div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  nObj = pCache.<a class="code" href="classripple_1_1TaggedCache.html#a8b19cf9b9885ddeceb282d5fb6757ce5">fetch</a>(hash);</div>
|
|
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordflow">if</span> (!nObj)</div>
|
|
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="comment">// We give up</span></div>
|
|
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  nCache.<a class="code" href="classripple_1_1KeyCache.html#a72fad1c7856e2c855e32de68eed56f82">insert</a>(hash);</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>  <span class="keywordflow">else</span></div>
|
|
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  {</div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="comment">// Ensure all threads get the same object</span></div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  pCache.<a class="code" href="classripple_1_1TaggedCache.html#af032e0e25c9e7757b75096f99b4d2ee7">canonicalize_replace_client</a>(hash, nObj);</div>
|
|
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  </div>
|
|
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="comment">// Since this was a 'hard' fetch, we will log it.</span></div>
|
|
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  JLOG(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0d7c3d303adce36199b2c67c4df8a2de">j_</a>.<a class="code" href="classbeast_1_1Journal.html#abbe082bd27ca0f1d1365af2824e4f85b">trace</a>()) << <span class="stringliteral">"HOS: "</span> << hash << <span class="stringliteral">" fetch: in db"</span>;</div>
|
|
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  }</div>
|
|
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  }</div>
|
|
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  report.<a class="code" href="structripple_1_1NodeStore_1_1FetchReport.html#a7ab35eb8a30af6dbc6ee916ccf60474d">wasFound</a> = <span class="keyword">static_cast<</span><span class="keywordtype">bool</span><span class="keyword">></span>(nObj);</div>
|
|
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  report.<a class="code" href="structripple_1_1NodeStore_1_1FetchReport.html#ad28c626873890debb451674b62037f57">elapsed</a> = duration_cast<milliseconds>(steady_clock::now() - before);</div>
|
|
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0e5bc58351ded4683d7207383794a484">scheduler_</a>.<a class="code" href="classripple_1_1NodeStore_1_1Scheduler.html#acf9a08ef64dd95c98da3e095ee919171">onFetch</a>(report);</div>
|
|
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">return</span> nObj;</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="keywordtype">bool</span></div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#aa823fdabd249fb54e2e2789c5e550ac9"> 230</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#aad7aa12d0cc01006120761d23312d428">Database::storeLedger</a>(</div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <a class="code" href="classripple_1_1Ledger.html">Ledger</a> <span class="keyword">const</span>& srcLedger,</div>
|
|
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Backend></a> dstBackend,</div>
|
|
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a><<a class="code" href="classripple_1_1TaggedCache.html">TaggedCache<uint256, NodeObject></a>> dstPCache,</div>
|
|
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a><<a class="code" href="classripple_1_1KeyCache.html">KeyCache<uint256></a>> dstNCache,</div>
|
|
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<Ledger const></a> next)</div>
|
|
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span> {</div>
|
|
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  assert(<span class="keyword">static_cast<</span><span class="keywordtype">bool</span><span class="keyword">></span>(dstPCache) == <span class="keyword">static_cast<</span><span class="keywordtype">bool</span><span class="keyword">></span>(dstNCache));</div>
|
|
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keywordflow">if</span> (srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#aab2ff724e7c4b0ccdea55d62cdab8bbc">hash</a>.<a class="code" href="classripple_1_1base__uint.html#a6fd7dba1ad932f4c1246c9a090c145e5">isZero</a>() || srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#aadfc3fc0c7935a8705f3e9ab0c49b9d5">accountHash</a>.<a class="code" href="classripple_1_1base__uint.html#a6fd7dba1ad932f4c1246c9a090c145e5">isZero</a>())</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>  assert(<span class="keyword">false</span>);</div>
|
|
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  JLOG(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0d7c3d303adce36199b2c67c4df8a2de">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>()) << <span class="stringliteral">"source ledger seq "</span> << srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a06608577034840a474361d55624ce9a0">seq</a></div>
|
|
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  << <span class="stringliteral">" is invalid"</span>;</div>
|
|
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <span class="keywordflow">return</span> <span class="keyword">false</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"> 245</span>  <span class="keyword">auto</span>& srcDB = <span class="keyword">const_cast<</span><a class="code" href="classripple_1_1NodeStore_1_1Database.html">Database</a>&<span class="keyword">></span>(srcLedger.<a class="code" href="classripple_1_1Ledger.html#ab63abcfcbba33c67bb15284381555313">stateMap</a>().<a class="code" href="classripple_1_1SHAMap.html#a59a75b533a405ac21e9a4ad5ac6369ac">family</a>().<a class="code" href="classripple_1_1Family.html#a2618f6f7bd3709acf853db111c814df2">db</a>());</div>
|
|
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="keywordflow">if</span> (&srcDB == <span class="keyword">this</span>)</div>
|
|
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  {</div>
|
|
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  assert(<span class="keyword">false</span>);</div>
|
|
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  JLOG(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0d7c3d303adce36199b2c67c4df8a2de">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>()) << <span class="stringliteral">"source and destination databases are the same"</span>;</div>
|
|
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</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>  </div>
|
|
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">Batch</a> batch;</div>
|
|
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  batch.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(<a class="code" href="namespaceripple_1_1NodeStore.html#a462140731267cdb1df0c7759a9a31512a3e7cbb590a2149da2328925f4ac5978a">batchWritePreallocationSize</a>);</div>
|
|
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keyword">auto</span> storeBatch = [&]() {</div>
|
|
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keywordflow">if</span> (dstPCache && dstNCache)</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>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& nObj : batch)</div>
|
|
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  {</div>
|
|
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  dstPCache->canonicalize_replace_cache(nObj->getHash(), nObj);</div>
|
|
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  dstNCache->erase(nObj->getHash());</div>
|
|
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#aa3570fbe5e933011616c7662961de3e5">storeStats</a>(nObj->getData().size());</div>
|
|
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  }</div>
|
|
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  }</div>
|
|
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  dstBackend->storeBatch(batch);</div>
|
|
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  batch.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/clear.html">clear</a>();</div>
|
|
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  batch.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(<a class="code" href="namespaceripple_1_1NodeStore.html#a462140731267cdb1df0c7759a9a31512a3e7cbb590a2149da2328925f4ac5978a">batchWritePreallocationSize</a>);</div>
|
|
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  };</div>
|
|
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keywordtype">bool</span> error = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keyword">auto</span> visit = [&](<a class="code" href="classripple_1_1SHAMapAbstractNode.html">SHAMapAbstractNode</a>& node) {</div>
|
|
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <span class="keywordflow">if</span> (<span class="keyword">auto</span> nObj = srcDB.fetch(</div>
|
|
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  node.getNodeHash().as_uint256(), srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a06608577034840a474361d55624ce9a0">seq</a>))</div>
|
|
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  {</div>
|
|
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  batch.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(std::move(nObj));</div>
|
|
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keywordflow">if</span> (batch.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() < <a class="code" href="namespaceripple_1_1NodeStore.html#a462140731267cdb1df0c7759a9a31512a3e7cbb590a2149da2328925f4ac5978a">batchWritePreallocationSize</a>)</div>
|
|
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  </div>
|
|
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  storeBatch();</div>
|
|
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  </div>
|
|
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">if</span> (!<a class="code" href="classripple_1_1Stoppable.html#a836b8737444ef1133c3596e61010fa80">isStopping</a>())</div>
|
|
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  }</div>
|
|
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  </div>
|
|
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  error = <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  };</div>
|
|
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  </div>
|
|
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="comment">// Store ledger header</span></div>
|
|
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  {</div>
|
|
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <a class="code" href="classripple_1_1Serializer.html">Serializer</a> s(<span class="keyword">sizeof</span>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a>) + <span class="keyword">sizeof</span>(<a class="code" href="structripple_1_1LedgerInfo.html">LedgerInfo</a>));</div>
|
|
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  s.<a class="code" href="classripple_1_1Serializer.html#a55ebab5e9bf8d8231da8f3c796150719">add32</a>(<a class="code" href="namespaceripple.html#ad5143ceada01141772ae4aab984f94bda7fa2267e9b1bf739a70bb1860ab2a99c">HashPrefix::ledgerMaster</a>);</div>
|
|
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <a class="code" href="namespaceripple.html#ad7942728afb82fa3846f81251de60e3e">addRaw</a>(srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>(), s);</div>
|
|
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keyword">auto</span> nObj = <a class="code" href="classripple_1_1NodeObject.html#a841bb9bba547efbd89b240fa9c1cf146">NodeObject::createObject</a>(</div>
|
|
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <a class="code" href="namespaceripple.html#a57d7e7b27df7e719fdf5569f96be60a3ae32ab8a0b50eee52b61ca3c8e5a56da1">hotLEDGER</a>, std::move(s.<a class="code" href="classripple_1_1Serializer.html#a6d7436e5990cb278bd924cef9396df3c">modData</a>()), srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#aab2ff724e7c4b0ccdea55d62cdab8bbc">hash</a>);</div>
|
|
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  batch.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(std::move(nObj));</div>
|
|
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  }</div>
|
|
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  </div>
|
|
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="comment">// Store the state map</span></div>
|
|
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="keywordflow">if</span> (srcLedger.<a class="code" href="classripple_1_1Ledger.html#ab63abcfcbba33c67bb15284381555313">stateMap</a>().<a class="code" href="classripple_1_1SHAMap.html#a9b0dff3c3bf35efc30104c93becdc079">getHash</a>().<a class="code" href="classripple_1_1SHAMapHash.html#a6e42edf954f9565ebffd6a9036d6646f">isNonZero</a>())</div>
|
|
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  {</div>
|
|
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordflow">if</span> (!srcLedger.<a class="code" href="classripple_1_1Ledger.html#ab63abcfcbba33c67bb15284381555313">stateMap</a>().<a class="code" href="classripple_1_1SHAMap.html#aa36f13285448ce66cdc04a0b7f4d8af7">isValid</a>())</div>
|
|
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  {</div>
|
|
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  JLOG(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0d7c3d303adce36199b2c67c4df8a2de">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>()) << <span class="stringliteral">"source ledger seq "</span> << srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a06608577034840a474361d55624ce9a0">seq</a></div>
|
|
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  << <span class="stringliteral">" state map invalid"</span>;</div>
|
|
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  }</div>
|
|
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keywordflow">if</span> (next && next->info().parentHash == srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#aab2ff724e7c4b0ccdea55d62cdab8bbc">hash</a>)</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>  <span class="keyword">auto</span> have = next->stateMap().snapShot(<span class="keyword">false</span>);</div>
|
|
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  srcLedger.<a class="code" href="classripple_1_1Ledger.html#ab63abcfcbba33c67bb15284381555313">stateMap</a>().<a class="code" href="classripple_1_1SHAMap.html#ae3639927ea223b4352d9cfe060827944">snapShot</a>(<span class="keyword">false</span>)->visitDifferences(</div>
|
|
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  &(*have), visit);</div>
|
|
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  }</div>
|
|
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="keywordflow">else</span></div>
|
|
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  srcLedger.<a class="code" href="classripple_1_1Ledger.html#ab63abcfcbba33c67bb15284381555313">stateMap</a>().<a class="code" href="classripple_1_1SHAMap.html#ae3639927ea223b4352d9cfe060827944">snapShot</a>(<span class="keyword">false</span>)->visitNodes(visit);</div>
|
|
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <span class="keywordflow">if</span> (error)</div>
|
|
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  }</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="comment">// Store the transaction map</span></div>
|
|
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <span class="keywordflow">if</span> (srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a1ddad764a35cb7eb22d0b4b62df047d5">txHash</a>.<a class="code" href="classripple_1_1base__uint.html#ad2bffc75e554b89befbb9388e07392c0">isNonZero</a>())</div>
|
|
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  {</div>
|
|
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">if</span> (!srcLedger.<a class="code" href="classripple_1_1Ledger.html#adefba8f4497f8dc4554dc1e7026e05a2">txMap</a>().<a class="code" href="classripple_1_1SHAMap.html#aa36f13285448ce66cdc04a0b7f4d8af7">isValid</a>())</div>
|
|
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  {</div>
|
|
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  JLOG(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0d7c3d303adce36199b2c67c4df8a2de">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>()) << <span class="stringliteral">"source ledger seq "</span> << srcLedger.<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a06608577034840a474361d55624ce9a0">seq</a></div>
|
|
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  << <span class="stringliteral">" transaction map invalid"</span>;</div>
|
|
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">return</span> <span class="keyword">false</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"> 328</span>  srcLedger.<a class="code" href="classripple_1_1Ledger.html#adefba8f4497f8dc4554dc1e7026e05a2">txMap</a>().<a class="code" href="classripple_1_1SHAMap.html#ae3639927ea223b4352d9cfe060827944">snapShot</a>(<span class="keyword">false</span>)->visitNodes(visit);</div>
|
|
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  <span class="keywordflow">if</span> (error)</div>
|
|
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00331"></a><span class="lineno"> 331</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="keywordflow">if</span> (!batch.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>())</div>
|
|
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  storeBatch();</div>
|
|
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
|
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span> }</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> <span class="comment">// Entry point for async read threads</span></div>
|
|
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span> <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00340"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1Database.html#a7c4180512ff87a967de8091a019dc9f9"> 340</a></span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a7c4180512ff87a967de8091a019dc9f9">Database::threadEntry</a>()</div>
|
|
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span> {</div>
|
|
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <a class="code" href="namespacebeast.html#ab3bd70e6eb43bbd99b5fe518efce8c7e">beast::setCurrentThreadName</a>(<span class="stringliteral">"prefetch"</span>);</div>
|
|
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="keywordflow">while</span> (<span class="keyword">true</span>)</div>
|
|
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  {</div>
|
|
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> lastHash;</div>
|
|
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> lastSeq;</div>
|
|
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<TaggedCache<uint256, NodeObject></a>> lastPcache;</div>
|
|
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<KeyCache<uint256></a>> lastNcache;</div>
|
|
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  {</div>
|
|
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/unique_lock.html">std::unique_lock<std::mutex></a> lock(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a06fbf66d1f34a6162a17daf72e71eba9">readLock_</a>);</div>
|
|
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="keywordflow">while</span> (!<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0056efda3dfb01158eece68b05c98c2d">readShut_</a> && <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a20ecfe20206f927e8e6d6631053bd60d">read_</a>.empty())</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">// All work is done</span></div>
|
|
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a6af5c13598349c55003f520267e514c1">readGenCondVar_</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/condition_variable/notify_all.html">notify_all</a>();</div>
|
|
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a438af3c0eba7891bb79d5c5dcb902556">readCondVar_</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/condition_variable/wait.html">wait</a>(lock);</div>
|
|
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  }</div>
|
|
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1NodeStore_1_1Database.html#a0056efda3dfb01158eece68b05c98c2d">readShut_</a>)</div>
|
|
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <span class="keywordflow">break</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"> 360</span>  <span class="comment">// Read in key order to make the back end more efficient</span></div>
|
|
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="keyword">auto</span> it = <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a20ecfe20206f927e8e6d6631053bd60d">read_</a>.lower_bound(<a class="code" href="classripple_1_1NodeStore_1_1Database.html#afe98ed8463413de1a92d439cc1aebb35">readLastHash_</a>);</div>
|
|
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="keywordflow">if</span> (it == <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a20ecfe20206f927e8e6d6631053bd60d">read_</a>.end())</div>
|
|
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  {</div>
|
|
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  it = <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a20ecfe20206f927e8e6d6631053bd60d">read_</a>.begin();</div>
|
|
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="comment">// A generation has completed</span></div>
|
|
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  ++<a class="code" href="classripple_1_1NodeStore_1_1Database.html#adb20e114f931da87b2d25e8e1b1fe4ca">readGen_</a>;</div>
|
|
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a6af5c13598349c55003f520267e514c1">readGenCondVar_</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/thread/condition_variable/notify_all.html">notify_all</a>();</div>
|
|
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  }</div>
|
|
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  lastHash = it->first;</div>
|
|
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  lastSeq = std::get<0>(it->second);</div>
|
|
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  lastPcache = std::get<1>(it->second).lock();</div>
|
|
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  lastNcache = std::get<2>(it->second).lock();</div>
|
|
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a20ecfe20206f927e8e6d6631053bd60d">read_</a>.erase(it);</div>
|
|
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#afe98ed8463413de1a92d439cc1aebb35">readLastHash_</a> = lastHash;</div>
|
|
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  }</div>
|
|
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  </div>
|
|
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="comment">// Perform the read</span></div>
|
|
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  <span class="keywordflow">if</span> (lastPcache && lastNcache)</div>
|
|
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a1eb657a3b7c4b409f9640b82c11ed89e">doFetch</a>(lastHash, lastSeq, *lastPcache, *lastNcache, <span class="keyword">true</span>);</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> }</div>
|
|
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  </div>
|
|
<div class="line"><a name="l00383"></a><span class="lineno"> 383</span> } <span class="comment">// namespace NodeStore</span></div>
|
|
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span> } <span class="comment">// namespace ripple</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="aclassbeast_1_1Journal_html_a3dfb8e2e3eecccdb5cf78ff21bca069c"><div class="ttname"><a href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">beast::Journal::fatal</a></div><div class="ttdeci">Stream fatal() const</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00339">Journal.h:339</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Section_html"><div class="ttname"><a href="classripple_1_1Section.html">ripple::Section</a></div><div class="ttdoc">Holds a collection of configuration values.</div><div class="ttdef"><b>Definition:</b> <a href="BasicConfig_8h_source.html#l00043">BasicConfig.h:43</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_ad5143ceada01141772ae4aab984f94bda7fa2267e9b1bf739a70bb1860ab2a99c"><div class="ttname"><a href="namespaceripple.html#ad5143ceada01141772ae4aab984f94bda7fa2267e9b1bf739a70bb1860ab2a99c">ripple::HashPrefix::ledgerMaster</a></div><div class="ttdeci">@ ledgerMaster</div><div class="ttdoc">ledger master data for signing</div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_afe98ed8463413de1a92d439cc1aebb35"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#afe98ed8463413de1a92d439cc1aebb35">ripple::NodeStore::Database::readLastHash_</a></div><div class="ttdeci">uint256 readLastHash_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00310">Database.h:310</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1SHAMap_html_aa36f13285448ce66cdc04a0b7f4d8af7"><div class="ttname"><a href="classripple_1_1SHAMap.html#aa36f13285448ce66cdc04a0b7f4d8af7">ripple::SHAMap::isValid</a></div><div class="ttdeci">bool isValid() const</div><div class="ttdef"><b>Definition:</b> <a href="SHAMap_8h_source.html#l00522">SHAMap.h:522</a></div></div>
|
|
<div class="ttc" id="amake_tuple_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/tuple/make_tuple.html">std::make_tuple</a></div><div class="ttdeci">T make_tuple(T... args)</div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a20ecfe20206f927e8e6d6631053bd60d"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a20ecfe20206f927e8e6d6631053bd60d">ripple::NodeStore::Database::read_</a></div><div class="ttdeci">std::map< uint256, std::tuple< std::uint32_t, std::weak_ptr< TaggedCache< uint256, NodeObject > >, std::weak_ptr< KeyCache< uint256 > > > > read_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00307">Database.h:307</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html">ripple::NodeStore::Database</a></div><div class="ttdoc">Persistency layer for NodeObject.</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00053">Database.h:53</a></div></div>
|
|
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div><div class="ttdoc">STL class.</div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a0056efda3dfb01158eece68b05c98c2d"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a0056efda3dfb01158eece68b05c98c2d">ripple::NodeStore::Database::readShut_</a></div><div class="ttdeci">bool readShut_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00313">Database.h:313</a></div></div>
|
|
<div class="ttc" id="ashared_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a></div><div class="ttdoc">STL class.</div></div>
|
|
<div class="ttc" id="aclassripple_1_1TaggedCache_html"><div class="ttname"><a href="classripple_1_1TaggedCache.html">ripple::TaggedCache</a></div><div class="ttdoc">Map/cache combination.</div><div class="ttdef"><b>Definition:</b> <a href="TaggedCache_8h_source.html#l00052">TaggedCache.h:52</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1SHAMap_html_a9b0dff3c3bf35efc30104c93becdc079"><div class="ttname"><a href="classripple_1_1SHAMap.html#a9b0dff3c3bf35efc30104c93becdc079">ripple::SHAMap::getHash</a></div><div class="ttdeci">SHAMapHash getHash() const</div><div class="ttdef"><b>Definition:</b> <a href="SHAMap_8cpp_source.html#l00795">SHAMap.cpp:795</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a1eb657a3b7c4b409f9640b82c11ed89e"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a1eb657a3b7c4b409f9640b82c11ed89e">ripple::NodeStore::Database::doFetch</a></div><div class="ttdeci">std::shared_ptr< NodeObject > doFetch(uint256 const &hash, std::uint32_t seq, TaggedCache< uint256, NodeObject > &pCache, KeyCache< uint256 > &nCache, bool isAsync)</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00184">Database.cpp:184</a></div></div>
|
|
<div class="ttc" id="aexception_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/exception.html">std::exception</a></div><div class="ttdoc">STL class.</div></div>
|
|
<div class="ttc" id="aclassripple_1_1base__uint_html_ad2bffc75e554b89befbb9388e07392c0"><div class="ttname"><a href="classripple_1_1base__uint.html#ad2bffc75e554b89befbb9388e07392c0">ripple::base_uint::isNonZero</a></div><div class="ttdeci">bool isNonZero() const</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00480">base_uint.h:480</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Stoppable_html_a65a95f9c14637491df60d3a07518fa09"><div class="ttname"><a href="classripple_1_1Stoppable.html#a65a95f9c14637491df60d3a07518fa09">ripple::Stoppable::stopped</a></div><div class="ttdeci">void stopped()</div><div class="ttdoc">Called by derived classes to indicate that the stoppable has stopped.</div><div class="ttdef"><b>Definition:</b> <a href="Stoppable_8cpp_source.html#l00072">Stoppable.cpp:72</a></div></div>
|
|
<div class="ttc" id="aclassbeast_1_1Journal_html_abbe082bd27ca0f1d1365af2824e4f85b"><div class="ttname"><a href="classbeast_1_1Journal.html#abbe082bd27ca0f1d1365af2824e4f85b">beast::Journal::trace</a></div><div class="ttdeci">Stream trace() const</div><div class="ttdoc">Severity stream access functions.</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00309">Journal.h:309</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a7a4466bf521bdf460d959227e0f08c52"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a7a4466bf521bdf460d959227e0f08c52">ripple::NodeStore::Database::fetchFrom</a></div><div class="ttdeci">virtual std::shared_ptr< NodeObject > fetchFrom(uint256 const &hash, std::uint32_t seq)=0</div></div>
|
|
<div class="ttc" id="anamespaceripple_1_1NodeStore_html_af127c2e4fc73b5d35647147ef45b350ca852178e08b8b1f2eb19fd271e63830ef"><div class="ttname"><a href="namespaceripple_1_1NodeStore.html#af127c2e4fc73b5d35647147ef45b350ca852178e08b8b1f2eb19fd271e63830ef">ripple::NodeStore::ok</a></div><div class="ttdeci">@ ok</div><div class="ttdef"><b>Definition:</b> <a href="nodestore_2Types_8h_source.html#l00045">nodestore/Types.h:45</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1SHAMap_html_a59a75b533a405ac21e9a4ad5ac6369ac"><div class="ttname"><a href="classripple_1_1SHAMap.html#a59a75b533a405ac21e9a4ad5ac6369ac">ripple::SHAMap::family</a></div><div class="ttdeci">Family const & family() const</div><div class="ttdef"><b>Definition:</b> <a href="SHAMap_8h_source.html#l00111">SHAMap.h:111</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Serializer_html_a6d7436e5990cb278bd924cef9396df3c"><div class="ttname"><a href="classripple_1_1Serializer.html#a6d7436e5990cb278bd924cef9396df3c">ripple::Serializer::modData</a></div><div class="ttdeci">Blob & modData()</div><div class="ttdef"><b>Definition:</b> <a href="Serializer_8h_source.html#l00176">Serializer.h:176</a></div></div>
|
|
<div class="ttc" id="areserve_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">std::vector::reserve</a></div><div class="ttdeci">T reserve(T... args)</div></div>
|
|
<div class="ttc" id="astructripple_1_1LedgerInfo_html_aab2ff724e7c4b0ccdea55d62cdab8bbc"><div class="ttname"><a href="structripple_1_1LedgerInfo.html#aab2ff724e7c4b0ccdea55d62cdab8bbc">ripple::LedgerInfo::hash</a></div><div class="ttdeci">uint256 hash</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00100">ReadView.h:100</a></div></div>
|
|
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector< std::shared_ptr< NodeObject > ></a></div></div>
|
|
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeObject_html_a841bb9bba547efbd89b240fa9c1cf146"><div class="ttname"><a href="classripple_1_1NodeObject.html#a841bb9bba547efbd89b240fa9c1cf146">ripple::NodeObject::createObject</a></div><div class="ttdeci">static std::shared_ptr< NodeObject > createObject(NodeObjectType type, Blob &&data, uint256 const &hash)</div><div class="ttdoc">Create an object from fields.</div><div class="ttdef"><b>Definition:</b> <a href="NodeObject_8cpp_source.html#l00037">NodeObject.cpp:37</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1TaggedCache_html_a8b19cf9b9885ddeceb282d5fb6757ce5"><div class="ttname"><a href="classripple_1_1TaggedCache.html#a8b19cf9b9885ddeceb282d5fb6757ce5">ripple::TaggedCache::fetch</a></div><div class="ttdeci">std::shared_ptr< T > fetch(const key_type &key)</div><div class="ttdef"><b>Definition:</b> <a href="TaggedCache_8h_source.html#l00392">TaggedCache.h:392</a></div></div>
|
|
<div class="ttc" id="aclassbeast_1_1Journal_html_ad8fefe3e8ad583e1ed1bf02094ac3d8f"><div class="ttname"><a href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">beast::Journal::warn</a></div><div class="ttdeci">Stream warn() const</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00327">Journal.h:327</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a04150d23aa2acaf016d4ca40bd10804a"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a04150d23aa2acaf016d4ca40bd10804a">ripple::NodeStore::Database::fetchSz_</a></div><div class="ttdeci">std::atomic< std::uint32_t > fetchSz_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00294">Database.h:294</a></div></div>
|
|
<div class="ttc" id="alock_guard_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/lock_guard.html">std::lock_guard</a></div><div class="ttdoc">STL class.</div></div>
|
|
<div class="ttc" id="astructripple_1_1NodeStore_1_1FetchReport_html"><div class="ttname"><a href="structripple_1_1NodeStore_1_1FetchReport.html">ripple::NodeStore::FetchReport</a></div><div class="ttdoc">Contains information about a fetch operation.</div><div class="ttdef"><b>Definition:</b> <a href="ripple_2nodestore_2Scheduler_8h_source.html#l00030">ripple/nodestore/Scheduler.h:30</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_ad7942728afb82fa3846f81251de60e3e"><div class="ttname"><a href="namespaceripple.html#ad7942728afb82fa3846f81251de60e3e">ripple::addRaw</a></div><div class="ttdeci">void addRaw(LedgerInfo const &info, Serializer &s)</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l00043">View.cpp:43</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1LedgerInfo_html_a06608577034840a474361d55624ce9a0"><div class="ttname"><a href="structripple_1_1LedgerInfo.html#a06608577034840a474361d55624ce9a0">ripple::LedgerInfo::seq</a></div><div class="ttdeci">LedgerIndex seq</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00092">ReadView.h:92</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1SHAMapHash_html_a6e42edf954f9565ebffd6a9036d6646f"><div class="ttname"><a href="classripple_1_1SHAMapHash.html#a6e42edf954f9565ebffd6a9036d6646f">ripple::SHAMapHash::isNonZero</a></div><div class="ttdeci">bool isNonZero() const</div><div class="ttdef"><b>Definition:</b> <a href="SHAMapTreeNode_8h_source.html#l00069">SHAMapTreeNode.h:69</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1SHAMap_html_ae3639927ea223b4352d9cfe060827944"><div class="ttname"><a href="classripple_1_1SHAMap.html#ae3639927ea223b4352d9cfe060827944">ripple::SHAMap::snapShot</a></div><div class="ttdeci">std::shared_ptr< SHAMap > snapShot(bool isMutable) const</div><div class="ttdef"><b>Definition:</b> <a href="SHAMap_8cpp_source.html#l00055">SHAMap.cpp:55</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a89497b9b4c5530b58040931489015d30"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a89497b9b4c5530b58040931489015d30">ripple::NodeStore::Database::fetchHitCount_</a></div><div class="ttdeci">std::atomic< std::uint32_t > fetchHitCount_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00292">Database.h:292</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Family_html_a2618f6f7bd3709acf853db111c814df2"><div class="ttname"><a href="classripple_1_1Family.html#a2618f6f7bd3709acf853db111c814df2">ripple::Family::db</a></div><div class="ttdeci">virtual NodeStore::Database & db()=0</div></div>
|
|
<div class="ttc" id="astructripple_1_1LedgerInfo_html_a1ddad764a35cb7eb22d0b4b62df047d5"><div class="ttname"><a href="structripple_1_1LedgerInfo.html#a1ddad764a35cb7eb22d0b4b62df047d5">ripple::LedgerInfo::txHash</a></div><div class="ttdeci">uint256 txHash</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00101">ReadView.h:101</a></div></div>
|
|
<div class="ttc" id="aclear_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/clear.html">std::vector::clear</a></div><div class="ttdeci">T clear(T... args)</div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_ad93a1bca0da205d937a9b9781ffab7c9"><div class="ttname"><a href="classripple_1_1KeyCache.html#ad93a1bca0da205d937a9b9781ffab7c9">ripple::KeyCache::touch_if_exists</a></div><div class="ttdeci">bool touch_if_exists(KeyComparable const &key)</div><div class="ttdoc">Refresh the last access time on a key if present.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00234">KeyCache.h:234</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a06fbf66d1f34a6162a17daf72e71eba9"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a06fbf66d1f34a6162a17daf72e71eba9">ripple::NodeStore::Database::readLock_</a></div><div class="ttdeci">std::mutex readLock_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00296">Database.h:296</a></div></div>
|
|
<div class="ttc" id="apush_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">std::vector::push_back</a></div><div class="ttdeci">T push_back(T... args)</div></div>
|
|
<div class="ttc" id="anamespaceripple_1_1NodeStore_html_af127c2e4fc73b5d35647147ef45b350cafa8056068943efe12560207a8a503db8"><div class="ttname"><a href="namespaceripple_1_1NodeStore.html#af127c2e4fc73b5d35647147ef45b350cafa8056068943efe12560207a8a503db8">ripple::NodeStore::notFound</a></div><div class="ttdeci">@ notFound</div><div class="ttdef"><b>Definition:</b> <a href="nodestore_2Types_8h_source.html#l00046">nodestore/Types.h:46</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_ae84b30410af69ec7e7adcdb6265a4af8"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#ae84b30410af69ec7e7adcdb6265a4af8">ripple::NodeStore::Database::onChildrenStopped</a></div><div class="ttdeci">void onChildrenStopped() override</div><div class="ttdoc">Override called when all children have stopped.</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00087">Database.cpp:87</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint< 256 ></a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Ledger_html_a31a21cc451eaa0a5af304e2625dc75f5"><div class="ttname"><a href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">ripple::Ledger::info</a></div><div class="ttdeci">LedgerInfo const & info() const override</div><div class="ttdoc">Returns information about the ledger.</div><div class="ttdef"><b>Definition:</b> <a href="Ledger_8h_source.html#l00155">Ledger.h:155</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Stoppable_html"><div class="ttname"><a href="classripple_1_1Stoppable.html">ripple::Stoppable</a></div><div class="ttdoc">Provides an interface for starting and stopping.</div><div class="ttdef"><b>Definition:</b> <a href="Stoppable_8h_source.html#l00201">Stoppable.h:201</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_af885d9fe877259a258481f0df20697cd"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#af885d9fe877259a258481f0df20697cd">ripple::NodeStore::Database::importInternal</a></div><div class="ttdeci">void importInternal(Backend &dstBackend, Database &srcDB)</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00158">Database.cpp:158</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1base__uint_html_a6fd7dba1ad932f4c1246c9a090c145e5"><div class="ttname"><a href="classripple_1_1base__uint.html#a6fd7dba1ad932f4c1246c9a090c145e5">ripple::base_uint::isZero</a></div><div class="ttdeci">bool isZero() const</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00475">base_uint.h:475</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_a72fad1c7856e2c855e32de68eed56f82"><div class="ttname"><a href="classripple_1_1KeyCache.html#a72fad1c7856e2c855e32de68eed56f82">ripple::KeyCache::insert</a></div><div class="ttdeci">bool insert(Key const &key)</div><div class="ttdoc">Insert the specified key.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00213">KeyCache.h:213</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Ledger_html"><div class="ttname"><a href="classripple_1_1Ledger.html">ripple::Ledger</a></div><div class="ttdoc">Holds a ledger.</div><div class="ttdef"><b>Definition:</b> <a href="Ledger_8h_source.html#l00077">Ledger.h:77</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_ad99788f1aca6ce31a1fe8365eee1bba3"><div class="ttname"><a href="namespaceripple.html#ad99788f1aca6ce31a1fe8365eee1bba3">ripple::Rethrow</a></div><div class="ttdeci">void Rethrow()</div><div class="ttdoc">Rethrow the exception currently being handled.</div><div class="ttdef"><b>Definition:</b> <a href="contract_8h_source.html#l00048">contract.h:48</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Ledger_html_ab63abcfcbba33c67bb15284381555313"><div class="ttname"><a href="classripple_1_1Ledger.html#ab63abcfcbba33c67bb15284381555313">ripple::Ledger::stateMap</a></div><div class="ttdeci">SHAMap const & stateMap() const</div><div class="ttdef"><b>Definition:</b> <a href="Ledger_8h_source.html#l00289">Ledger.h:289</a></div></div>
|
|
<div class="ttc" id="aunique_lock_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/unique_lock.html">std::unique_lock</a></div><div class="ttdoc">STL class.</div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a438af3c0eba7891bb79d5c5dcb902556"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a438af3c0eba7891bb79d5c5dcb902556">ripple::NodeStore::Database::readCondVar_</a></div><div class="ttdeci">std::condition_variable readCondVar_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00297">Database.h:297</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a332e25e0d08606b9eb501b9f83755dce"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a332e25e0d08606b9eb501b9f83755dce">ripple::NodeStore::Database::waitReads</a></div><div class="ttdeci">void waitReads()</div><div class="ttdoc">Wait for all currently pending async reads to complete.</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00061">Database.cpp:61</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_aa3570fbe5e933011616c7662961de3e5"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#aa3570fbe5e933011616c7662961de3e5">ripple::NodeStore::Database::storeStats</a></div><div class="ttdeci">void storeStats(size_t sz)</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00250">Database.h:250</a></div></div>
|
|
<div class="ttc" id="aclassbeast_1_1Journal_html_a49b0713e65bb8e2c51b76fbf16252afe"><div class="ttname"><a href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">beast::Journal::error</a></div><div class="ttdeci">Stream error() const</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00333">Journal.h:333</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_1_1NodeStore_html_a462140731267cdb1df0c7759a9a31512a3e7cbb590a2149da2328925f4ac5978a"><div class="ttname"><a href="namespaceripple_1_1NodeStore.html#a462140731267cdb1df0c7759a9a31512a3e7cbb590a2149da2328925f4ac5978a">ripple::NodeStore::batchWritePreallocationSize</a></div><div class="ttdeci">@ batchWritePreallocationSize</div><div class="ttdef"><b>Definition:</b> <a href="nodestore_2Types_8h_source.html#l00034">nodestore/Types.h:34</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Scheduler_html_acf9a08ef64dd95c98da3e095ee919171"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Scheduler.html#acf9a08ef64dd95c98da3e095ee919171">ripple::NodeStore::Scheduler::onFetch</a></div><div class="ttdeci">virtual void onFetch(FetchReport const &report)=0</div><div class="ttdoc">Reports completion of a fetch Allows the scheduler to monitor the node store's performance.</div></div>
|
|
<div class="ttc" id="aclassbeast_1_1Journal_html"><div class="ttname"><a href="classbeast_1_1Journal.html">beast::Journal</a></div><div class="ttdoc">A generic endpoint for log messages.</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00058">Journal.h:58</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_1_1NodeStore_html_af127c2e4fc73b5d35647147ef45b350ca915a2fc67fa0633b4995f8c1e4d54bdf"><div class="ttname"><a href="namespaceripple_1_1NodeStore.html#af127c2e4fc73b5d35647147ef45b350ca915a2fc67fa0633b4995f8c1e4d54bdf">ripple::NodeStore::dataCorrupt</a></div><div class="ttdeci">@ dataCorrupt</div><div class="ttdef"><b>Definition:</b> <a href="nodestore_2Types_8h_source.html#l00047">nodestore/Types.h:47</a></div></div>
|
|
<div class="ttc" id="ainteger_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a></div></div>
|
|
<div class="ttc" id="await_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/condition_variable/wait.html">std::condition_variable::wait</a></div><div class="ttdeci">T wait(T... args)</div></div>
|
|
<div class="ttc" id="astructripple_1_1NodeStore_1_1FetchReport_html_a989fdb05f6f07b1c34ea63a3524d6029"><div class="ttname"><a href="structripple_1_1NodeStore_1_1FetchReport.html#a989fdb05f6f07b1c34ea63a3524d6029">ripple::NodeStore::FetchReport::isAsync</a></div><div class="ttdeci">bool isAsync</div><div class="ttdef"><b>Definition:</b> <a href="ripple_2nodestore_2Scheduler_8h_source.html#l00035">ripple/nodestore/Scheduler.h:35</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Scheduler_html"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Scheduler.html">ripple::NodeStore::Scheduler</a></div><div class="ttdoc">Scheduling for asynchronous backend activity.</div><div class="ttdef"><b>Definition:</b> <a href="ripple_2nodestore_2Scheduler_8h_source.html#l00057">ripple/nodestore/Scheduler.h:57</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a2e1cec1845007e7037214306b2c4bf45"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a2e1cec1845007e7037214306b2c4bf45">ripple::NodeStore::Database::~Database</a></div><div class="ttdeci">virtual ~Database()</div><div class="ttdoc">Destroy the node store.</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00049">Database.cpp:49</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a2b5174a0ffb315030b96815d6ac86eaf"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a2b5174a0ffb315030b96815d6ac86eaf">ripple::NodeStore::Database::for_each</a></div><div class="ttdeci">virtual void for_each(std::function< void(std::shared_ptr< NodeObject >)> f)=0</div><div class="ttdoc">Visit every object in the database This is usually called during import.</div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a109754c4bed6627ba778fa84244177a4"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a109754c4bed6627ba778fa84244177a4">ripple::NodeStore::Database::fetchInternal</a></div><div class="ttdeci">std::shared_ptr< NodeObject > fetchInternal(uint256 const &hash, std::shared_ptr< Backend > backend)</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00123">Database.cpp:123</a></div></div>
|
|
<div class="ttc" id="anotify_one_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/condition_variable/notify_one.html">std::condition_variable::notify_one</a></div><div class="ttdeci">T notify_one(T... args)</div></div>
|
|
<div class="ttc" id="anamespaceripple_1_1NodeStore_html_af127c2e4fc73b5d35647147ef45b350c"><div class="ttname"><a href="namespaceripple_1_1NodeStore.html#af127c2e4fc73b5d35647147ef45b350c">ripple::NodeStore::Status</a></div><div class="ttdeci">Status</div><div class="ttdoc">Return codes from Backend operations.</div><div class="ttdef"><b>Definition:</b> <a href="nodestore_2Types_8h_source.html#l00044">nodestore/Types.h:44</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a7c4180512ff87a967de8091a019dc9f9"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a7c4180512ff87a967de8091a019dc9f9">ripple::NodeStore::Database::threadEntry</a></div><div class="ttdeci">void threadEntry()</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00340">Database.cpp:340</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Serializer_html"><div class="ttname"><a href="classripple_1_1Serializer.html">ripple::Serializer</a></div><div class="ttdef"><b>Definition:</b> <a href="Serializer_8h_source.html#l00039">Serializer.h:39</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Ledger_html_adefba8f4497f8dc4554dc1e7026e05a2"><div class="ttname"><a href="classripple_1_1Ledger.html#adefba8f4497f8dc4554dc1e7026e05a2">ripple::Ledger::txMap</a></div><div class="ttdeci">SHAMap const & txMap() const</div><div class="ttdef"><b>Definition:</b> <a href="Ledger_8h_source.html#l00301">Ledger.h:301</a></div></div>
|
|
<div class="ttc" id="anamespacebeast_html_ab3bd70e6eb43bbd99b5fe518efce8c7e"><div class="ttname"><a href="namespacebeast.html#ab3bd70e6eb43bbd99b5fe518efce8c7e">beast::setCurrentThreadName</a></div><div class="ttdeci">void setCurrentThreadName(std::string_view name)</div><div class="ttdoc">Changes the name of the caller thread.</div><div class="ttdef"><b>Definition:</b> <a href="CurrentThreadName_8cpp_source.html#l00119">CurrentThreadName.cpp:119</a></div></div>
|
|
<div class="ttc" id="aemplace_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">std::vector::emplace_back</a></div><div class="ttdeci">T emplace_back(T... args)</div></div>
|
|
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="RCLCensorshipDetector_8h_source.html#l00029">RCLCensorshipDetector.h:29</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a0923c37ede6c7ffeca02f59f566cf588"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a0923c37ede6c7ffeca02f59f566cf588">ripple::NodeStore::Database::onStop</a></div><div class="ttdeci">void onStop() override</div><div class="ttdoc">Override called when the stop notification is issued.</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00079">Database.cpp:79</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_aad7aa12d0cc01006120761d23312d428"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#aad7aa12d0cc01006120761d23312d428">ripple::NodeStore::Database::storeLedger</a></div><div class="ttdeci">virtual bool storeLedger(std::shared_ptr< Ledger const > const &srcLedger)=0</div><div class="ttdoc">Copies a ledger stored in a different database to this one.</div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a6af5c13598349c55003f520267e514c1"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a6af5c13598349c55003f520267e514c1">ripple::NodeStore::Database::readGenCondVar_</a></div><div class="ttdeci">std::condition_variable readGenCondVar_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00298">Database.h:298</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a743a610ca48e4585fc4fecda6c52d311"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a743a610ca48e4585fc4fecda6c52d311">ripple::NodeStore::Database::storeCount_</a></div><div class="ttdeci">std::atomic< std::uint32_t > storeCount_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00290">Database.h:290</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1base__uint_html_a2ffd09234d574e5554c5d84199a9f287"><div class="ttname"><a href="classripple_1_1base__uint.html#a2ffd09234d574e5554c5d84199a9f287">ripple::base_uint::begin</a></div><div class="ttdeci">iterator begin()</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00114">base_uint.h:114</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a0d7c3d303adce36199b2c67c4df8a2de"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a0d7c3d303adce36199b2c67c4df8a2de">ripple::NodeStore::Database::j_</a></div><div class="ttdeci">const beast::Journal j_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00242">Database.h:242</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1NodeStore_1_1FetchReport_html_a7ab35eb8a30af6dbc6ee916ccf60474d"><div class="ttname"><a href="structripple_1_1NodeStore_1_1FetchReport.html#a7ab35eb8a30af6dbc6ee916ccf60474d">ripple::NodeStore::FetchReport::wasFound</a></div><div class="ttdeci">bool wasFound</div><div class="ttdef"><b>Definition:</b> <a href="ripple_2nodestore_2Scheduler_8h_source.html#l00037">ripple/nodestore/Scheduler.h:37</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_ad769f906ab9351dc6c4fa166b3937e1c"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#ad769f906ab9351dc6c4fa166b3937e1c">ripple::NodeStore::Database::readThreads_</a></div><div class="ttdeci">std::vector< std::thread > readThreads_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00312">Database.h:312</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_ab8f5eeb95d1166af47301d041b3063f2"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#ab8f5eeb95d1166af47301d041b3063f2">ripple::NodeStore::Database::stopThreads</a></div><div class="ttdeci">void stopThreads()</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00093">Database.cpp:93</a></div></div>
|
|
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace.</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a2c550f167665d94744b297523ff07de2"><div class="ttname"><a href="namespaceripple.html#a2c550f167665d94744b297523ff07de2">ripple::XRP_LEDGER_EARLIEST_SEQ</a></div><div class="ttdeci">static constexpr std::uint32_t XRP_LEDGER_EARLIEST_SEQ</div><div class="ttdoc">The XRP ledger network's earliest allowed sequence.</div><div class="ttdef"><b>Definition:</b> <a href="SystemParameters_8h_source.html#l00061">SystemParameters.h:61</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a44b4880cc7028c8171c4a901381ba21e"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a44b4880cc7028c8171c4a901381ba21e">ripple::NodeStore::Database::asyncFetch</a></div><div class="ttdeci">virtual bool asyncFetch(uint256 const &hash, std::uint32_t seq, std::shared_ptr< NodeObject > &object)=0</div><div class="ttdoc">Fetch an object without waiting.</div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_aa59aca23acd391245f0b403df74ac8be"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#aa59aca23acd391245f0b403df74ac8be">ripple::NodeStore::Database::earliestLedgerSeq_</a></div><div class="ttdeci">const std::uint32_t earliestLedgerSeq_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00320">Database.h:320</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a53935eeab8c4e74a956fd3d70c85a35b"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a53935eeab8c4e74a956fd3d70c85a35b">ripple::NodeStore::Database::fetchTotalCount_</a></div><div class="ttdeci">std::atomic< std::uint32_t > fetchTotalCount_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00291">Database.h:291</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1SHAMapAbstractNode_html"><div class="ttname"><a href="classripple_1_1SHAMapAbstractNode.html">ripple::SHAMapAbstractNode</a></div><div class="ttdef"><b>Definition:</b> <a href="SHAMapTreeNode_8h_source.html#l00122">SHAMapTreeNode.h:122</a></div></div>
|
|
<div class="ttc" id="aempty_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/empty.html">std::vector::empty</a></div><div class="ttdeci">T empty(T... args)</div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a5b5b290bf11d892a23a53e3e3beb2cfe"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a5b5b290bf11d892a23a53e3e3beb2cfe">ripple::NodeStore::Database::storeSz_</a></div><div class="ttdeci">std::atomic< std::uint32_t > storeSz_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00293">Database.h:293</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_adb20e114f931da87b2d25e8e1b1fe4ca"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#adb20e114f931da87b2d25e8e1b1fe4ca">ripple::NodeStore::Database::readGen_</a></div><div class="ttdeci">uint64_t readGen_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00316">Database.h:316</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a57d7e7b27df7e719fdf5569f96be60a3ae32ab8a0b50eee52b61ca3c8e5a56da1"><div class="ttname"><a href="namespaceripple.html#a57d7e7b27df7e719fdf5569f96be60a3ae32ab8a0b50eee52b61ca3c8e5a56da1">ripple::hotLEDGER</a></div><div class="ttdeci">@ hotLEDGER</div><div class="ttdef"><b>Definition:</b> <a href="NodeObject_8h_source.html#l00034">NodeObject.h:34</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Serializer_html_a55ebab5e9bf8d8231da8f3c796150719"><div class="ttname"><a href="classripple_1_1Serializer.html#a55ebab5e9bf8d8231da8f3c796150719">ripple::Serializer::add32</a></div><div class="ttdeci">int add32(std::uint32_t i)</div><div class="ttdef"><b>Definition:</b> <a href="Serializer_8cpp_source.html#l00038">Serializer.cpp:38</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1LedgerInfo_html"><div class="ttname"><a href="structripple_1_1LedgerInfo.html">ripple::LedgerInfo</a></div><div class="ttdoc">Information about the notional ledger backing the view.</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00084">ReadView.h:84</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a0e5bc58351ded4683d7207383794a484"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a0e5bc58351ded4683d7207383794a484">ripple::NodeStore::Database::scheduler_</a></div><div class="ttdeci">Scheduler & scheduler_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00243">Database.h:243</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1TaggedCache_html_af032e0e25c9e7757b75096f99b4d2ee7"><div class="ttname"><a href="classripple_1_1TaggedCache.html#af032e0e25c9e7757b75096f99b4d2ee7">ripple::TaggedCache::canonicalize_replace_client</a></div><div class="ttdeci">bool canonicalize_replace_client(const key_type &key, std::shared_ptr< T > &data)</div><div class="ttdef"><b>Definition:</b> <a href="TaggedCache_8h_source.html#l00386">TaggedCache.h:386</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html"><div class="ttname"><a href="classripple_1_1KeyCache.html">ripple::KeyCache</a></div><div class="ttdoc">Maintains a cache of keys with no associated data.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00043">KeyCache.h:43</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Backend_html_acb1f22b4101841e695477646c95376a7"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Backend.html#acb1f22b4101841e695477646c95376a7">ripple::NodeStore::Backend::storeBatch</a></div><div class="ttdeci">virtual void storeBatch(Batch const &batch)=0</div><div class="ttdoc">Store a group of objects.</div></div>
|
|
<div class="ttc" id="astructripple_1_1NodeStore_1_1FetchReport_html_a3063c18d4ab5927e8a3cb129745a2ca3"><div class="ttname"><a href="structripple_1_1NodeStore_1_1FetchReport.html#a3063c18d4ab5927e8a3cb129745a2ca3">ripple::NodeStore::FetchReport::wentToDisk</a></div><div class="ttdeci">bool wentToDisk</div><div class="ttdef"><b>Definition:</b> <a href="ripple_2nodestore_2Scheduler_8h_source.html#l00036">ripple/nodestore/Scheduler.h:36</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1NodeStore_1_1FetchReport_html_ad28c626873890debb451674b62037f57"><div class="ttname"><a href="structripple_1_1NodeStore_1_1FetchReport.html#ad28c626873890debb451674b62037f57">ripple::NodeStore::FetchReport::elapsed</a></div><div class="ttdeci">std::chrono::milliseconds elapsed</div><div class="ttdef"><b>Definition:</b> <a href="ripple_2nodestore_2Scheduler_8h_source.html#l00034">ripple/nodestore/Scheduler.h:34</a></div></div>
|
|
<div class="ttc" id="anotify_all_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/condition_variable/notify_all.html">std::condition_variable::notify_all</a></div><div class="ttdeci">T notify_all(T... args)</div></div>
|
|
<div class="ttc" id="astructripple_1_1LedgerInfo_html_aadfc3fc0c7935a8705f3e9ab0c49b9d5"><div class="ttname"><a href="structripple_1_1LedgerInfo.html#aadfc3fc0c7935a8705f3e9ab0c49b9d5">ripple::LedgerInfo::accountHash</a></div><div class="ttdeci">uint256 accountHash</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00102">ReadView.h:102</a></div></div>
|
|
<div class="ttc" id="awhat_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/exception/what.html">std::exception::what</a></div><div class="ttdeci">T what(T... args)</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a104985c6e3067babe99aca6bbc51ba5d"><div class="ttname"><a href="namespaceripple.html#a104985c6e3067babe99aca6bbc51ba5d">ripple::get</a></div><div class="ttdeci">T & get(EitherAmount &amt)</div><div class="ttdef"><b>Definition:</b> <a href="AmountSpec_8h_source.html#l00116">AmountSpec.h:116</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_acd7da6cb652b11ecd6b40fb79d6f8b2f"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#acd7da6cb652b11ecd6b40fb79d6f8b2f">ripple::NodeStore::Database::Database</a></div><div class="ttdeci">Database()=delete</div></div>
|
|
<div class="ttc" id="aclassripple_1_1Stoppable_html_a836b8737444ef1133c3596e61010fa80"><div class="ttname"><a href="classripple_1_1Stoppable.html#a836b8737444ef1133c3596e61010fa80">ripple::Stoppable::isStopping</a></div><div class="ttdeci">bool isStopping() const</div><div class="ttdoc">Returns true if the stoppable should stop.</div><div class="ttdef"><b>Definition:</b> <a href="Stoppable_8cpp_source.html#l00054">Stoppable.cpp:54</a></div></div>
|
|
<div class="ttc" id="anamespacestd_1_1chrono_html"><div class="ttname"><a href="http://en.cppreference.com/w/namespacestd_1_1chrono.html">std::chrono</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Backend_html"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Backend.html">ripple::NodeStore::Backend</a></div><div class="ttdoc">A backend used for the NodeStore.</div><div class="ttdef"><b>Definition:</b> <a href="Backend_8h_source.html#l00037">Backend.h:37</a></div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|