This commit is contained in:
intelliot
2023-04-11 22:54:00 +00:00
parent af6e9013ea
commit 97153de244
159 changed files with 5791 additions and 5672 deletions

View File

@@ -174,222 +174,224 @@ $(function() {
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>&amp; item : ledger-&gt;<a class="code" href="classripple_1_1ReadView.html#a5c70dc4b36e757ed6472b0aef460d858">txs</a>)</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; {</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="keywordflow">if</span> (stop)</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="keywordflow">if</span> (stop.<a class="codeRef" href="http://en.cppreference.com/w/cpp/atomic/atomic/load.html">load</a>(std::memory_order_relaxed))</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> txID{item.first-&gt;getTransactionID()};</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sTxID{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(txID)};</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> txMeta{std::make_shared&lt;TxMeta&gt;(</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; txID, ledger-&gt;<a class="code" href="classripple_1_1ReadView.html#ac284afc905c482953c35c61b459fd85b">seq</a>(), *item.second)};</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <a class="code" href="classripple_1_1TxMeta.html">TxMeta</a> <span class="keyword">const</span> txMeta{</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; item.first-&gt;getTransactionID(),</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; ledger-&gt;<a class="code" href="classripple_1_1ReadView.html#ac284afc905c482953c35c61b459fd85b">seq</a>(),</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; *item.second};</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; </div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;DELETE FROM AccountTransactions &quot;</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="stringliteral">&quot;WHERE TransID = :txID;&quot;</span>,</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; soci::use(sTxID);</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span>&amp; accounts = txMeta-&gt;getAffectedAccounts();</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordflow">if</span> (!accounts.empty())</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; {</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sTxnSeq{<a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(txMeta-&gt;getIndex())};</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> s{boost::str(</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; boost::format(<span class="stringliteral">&quot;(&#39;%s&#39;,&#39;%s&#39;,%s,%s)&quot;</span>) % sTxID % <span class="stringliteral">&quot;%s&quot;</span> %</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; sSeq % sTxnSeq)};</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> sql;</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; sql.<a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string/reserve.html">reserve</a>((accounts.size() + 1) * 128);</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; sql =</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="stringliteral">&quot;INSERT INTO AccountTransactions &quot;</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="stringliteral">&quot;(TransID, Account, LedgerSeq, TxnSeq) VALUES &quot;</span>;</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; sql += boost::algorithm::join(</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; accounts |</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; boost::adaptors::transformed(</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; [&amp;](<a class="code" href="classripple_1_1base__uint.html">AccountID</a> <span class="keyword">const</span>&amp; accountID) {</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordflow">return</span> boost::str(</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; boost::format(s) %</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <a class="code" href="namespaceripple.html#a08a13b62b18272366f788632359e8793">ripple::toBase58</a>(accountID));</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; }),</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="stringliteral">&quot;,&quot;</span>);</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; sql += <span class="charliteral">&#39;;&#39;</span>;</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; session &lt;&lt; sql;</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; JLOG(j.<a class="code" href="classbeast_1_1Journal.html#abbe082bd27ca0f1d1365af2824e4f85b">trace</a>())</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; &lt;&lt; <span class="stringliteral">&quot;shard &quot;</span> &lt;&lt; index &lt;&lt; <span class="stringliteral">&quot; account transaction: &quot;</span> &lt;&lt; sql;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; }</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!<a class="code" href="namespaceripple.html#a076d4f6f5b4dbe69103fb54a69b98324">isPseudoTx</a>(*item.first))</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; {</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="comment">// It&#39;s okay for pseudo transactions to not affect any</span></div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="comment">// accounts. But otherwise...</span></div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; JLOG(j.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; &lt;&lt; <span class="stringliteral">&quot;shard &quot;</span> &lt;&lt; index &lt;&lt; <span class="stringliteral">&quot; transaction in ledger &quot;</span></div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; &lt;&lt; sSeq &lt;&lt; <span class="stringliteral">&quot; affects no accounts&quot;</span>;</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; }</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <a class="code" href="classripple_1_1Serializer.html">Serializer</a> s;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; item.second-&gt;add(s);</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; session</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; &lt;&lt; (<a class="code" href="classripple_1_1STTx.html#a2ac2b7a11b5738dba3a4e03be1303da1">STTx::getMetaSQLInsertReplaceHeader</a>() +</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; item.first-&gt;getMetaSQL(</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; ledgerSeq, <a class="code" href="namespaceripple.html#a9078e51480fd85c4bff715ecd3f141d5">sqlBlobLiteral</a>(s.<a class="code" href="classripple_1_1Serializer.html#a6d7436e5990cb278bd924cef9396df3c">modData</a>())) +</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="charliteral">&#39;;&#39;</span>);</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; }</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; }</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; tr.commit();</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; }</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; </div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<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="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sTxID = <a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(txMeta.getTxID());</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;DELETE FROM AccountTransactions &quot;</span></div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="stringliteral">&quot;WHERE TransID = :txID;&quot;</span>,</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; soci::use(sTxID);</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span>&amp; accounts = txMeta.getAffectedAccounts();</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordflow">if</span> (!accounts.empty())</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; {</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sTxnSeq{<a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(txMeta.getIndex())};</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> s{boost::str(</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; boost::format(<span class="stringliteral">&quot;(&#39;%s&#39;,&#39;%s&#39;,%s,%s)&quot;</span>) % sTxID % <span class="stringliteral">&quot;%s&quot;</span> %</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; sSeq % sTxnSeq)};</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> sql;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; sql.<a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string/reserve.html">reserve</a>((accounts.size() + 1) * 128);</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; sql =</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="stringliteral">&quot;INSERT INTO AccountTransactions &quot;</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="stringliteral">&quot;(TransID, Account, LedgerSeq, TxnSeq) VALUES &quot;</span>;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; sql += boost::algorithm::join(</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; accounts |</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; boost::adaptors::transformed(</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; [&amp;](<a class="code" href="classripple_1_1base__uint.html">AccountID</a> <span class="keyword">const</span>&amp; accountID) {</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordflow">return</span> boost::str(</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; boost::format(s) %</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <a class="code" href="namespaceripple.html#a08a13b62b18272366f788632359e8793">ripple::toBase58</a>(accountID));</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; }),</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="stringliteral">&quot;,&quot;</span>);</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; sql += <span class="charliteral">&#39;;&#39;</span>;</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; session &lt;&lt; sql;</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; JLOG(j.<a class="code" href="classbeast_1_1Journal.html#abbe082bd27ca0f1d1365af2824e4f85b">trace</a>())</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; &lt;&lt; <span class="stringliteral">&quot;shard &quot;</span> &lt;&lt; index &lt;&lt; <span class="stringliteral">&quot; account transaction: &quot;</span> &lt;&lt; sql;</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; }</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!<a class="code" href="namespaceripple.html#a076d4f6f5b4dbe69103fb54a69b98324">isPseudoTx</a>(*item.first))</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; {</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="comment">// It&#39;s okay for pseudo transactions to not affect any</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="comment">// accounts. But otherwise...</span></div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; JLOG(j.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; &lt;&lt; <span class="stringliteral">&quot;shard &quot;</span> &lt;&lt; index &lt;&lt; <span class="stringliteral">&quot; transaction in ledger &quot;</span></div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; &lt;&lt; sSeq &lt;&lt; <span class="stringliteral">&quot; affects no accounts&quot;</span>;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; }</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <a class="code" href="classripple_1_1Serializer.html">Serializer</a> s;</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; item.second-&gt;add(s);</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; session</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; &lt;&lt; (<a class="code" href="classripple_1_1STTx.html#a2ac2b7a11b5738dba3a4e03be1303da1">STTx::getMetaSQLInsertReplaceHeader</a>() +</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; item.first-&gt;getMetaSQL(</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; ledgerSeq, <a class="code" href="namespaceripple.html#a9078e51480fd85c4bff715ecd3f141d5">sqlBlobLiteral</a>(s.<a class="code" href="classripple_1_1Serializer.html#a6d7436e5990cb278bd924cef9396df3c">modData</a>())) +</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="charliteral">&#39;;&#39;</span>);</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; }</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; }</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; </div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; tr.commit();</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; }</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; </div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="comment">// Update the ledger database</span></div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; {</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="keyword">auto</span>&amp; session{lgrsession};</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; soci::transaction tr(session);</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sParentHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a5c129196edfd78e992f81959f075e5ca">parentHash</a>)};</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sDrops{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#ad789f949fc35acd576aac965b20aaaca">drops</a>)};</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sAccountHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#aadfc3fc0c7935a8705f3e9ab0c49b9d5">accountHash</a>)};</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sTxHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a1ddad764a35cb7eb22d0b4b62df047d5">txHash</a>)};</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; </div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;DELETE FROM Ledgers &quot;</span></div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="stringliteral">&quot;WHERE LedgerSeq = :seq;&quot;</span>,</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; soci::use(ledgerSeq);</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;INSERT OR REPLACE INTO Ledgers (&quot;</span></div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="stringliteral">&quot;LedgerHash, LedgerSeq, PrevHash, TotalCoins, ClosingTime,&quot;</span></div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="stringliteral">&quot;PrevClosingTime, CloseTimeRes, CloseFlags, AccountSetHash,&quot;</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="stringliteral">&quot;TransSetHash)&quot;</span></div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="stringliteral">&quot;VALUES (&quot;</span></div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="stringliteral">&quot;:ledgerHash, :ledgerSeq, :prevHash, :totalCoins,&quot;</span></div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="stringliteral">&quot;:closingTime, :prevClosingTime, :closeTimeRes,&quot;</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="stringliteral">&quot;:closeFlags, :accountSetHash, :transSetHash);&quot;</span>,</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; soci::use(sHash), soci::use(ledgerSeq), soci::use(sParentHash),</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; soci::use(sDrops),</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; soci::use(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a8776d1f7ea49b0e25577f5610620c8fc">closeTime</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/time_point/time_since_epoch.html">time_since_epoch</a>().count()),</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; soci::use(</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a3f7b6fb6d401cfc76e0179b061e02eb4">parentCloseTime</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/time_point/time_since_epoch.html">time_since_epoch</a>().count()),</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; soci::use(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a069fa542e2614d0046eccbe54bae7976">closeTimeResolution</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration/count.html">count</a>()),</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; soci::use(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a279f72e0664518d5fccd52ed7a92e0da">closeFlags</a>), soci::use(sAccountHash),</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; soci::use(sTxHash);</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; tr.commit();</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; }</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;}</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; </div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr&lt;DatabaseCon&gt;</a></div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="namespaceripple.html#af2ba549aa6ef230d23f39a19ba2178b1"> 206</a></span>&#160;<a class="code" href="namespaceripple.html#af2ba549aa6ef230d23f39a19ba2178b1">makeAcquireDB</a>(</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <a class="code" href="structripple_1_1DatabaseCon_1_1Setup.html">DatabaseCon::Setup</a> <span class="keyword">const</span>&amp; setup,</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <a class="code" href="structripple_1_1DatabaseCon_1_1CheckpointerSetup.html">DatabaseCon::CheckpointerSetup</a> <span class="keyword">const</span>&amp; checkpointerSetup)</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;{</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <span class="keywordflow">return</span> std::make_unique&lt;DatabaseCon&gt;(</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; setup,</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <a class="code" href="namespaceripple.html#a47b009ed46b45fea7af9c99491bd5893">AcquireShardDBName</a>,</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <a class="code" href="namespaceripple.html#a402fe8f2f041bd9e3d2f74c5d1e02bcd">AcquireShardDBPragma</a>,</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <a class="code" href="namespaceripple.html#acddd432321b548db97019aa913d637d4">AcquireShardDBInit</a>,</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; checkpointerSetup);</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;}</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="namespaceripple.html#ae80496e603d320c1d84a42d1d9279362"> 219</a></span>&#160;<a class="code" href="namespaceripple.html#ae80496e603d320c1d84a42d1d9279362">insertAcquireDBIndex</a>(soci::session&amp; session, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> index)</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;{</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;INSERT INTO Shard (ShardIndex) &quot;</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="stringliteral">&quot;VALUES (:shardIndex);&quot;</span>,</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; soci::use(index);</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;}</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; </div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair&lt;bool, std::optional&lt;std::string&gt;</a>&gt;</div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="namespaceripple.html#ae10a9a71c9b7a05557edecd508ccfb94"> 227</a></span>&#160;<a class="code" href="namespaceripple.html#ae10a9a71c9b7a05557edecd508ccfb94">selectAcquireDBLedgerSeqs</a>(soci::session&amp; session, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> index)</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;{</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <span class="comment">// resIndex and must be boost::optional (not std) because that&#39;s</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <span class="comment">// what SOCI expects in its interface.</span></div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; boost::optional&lt;std::uint32_t&gt; resIndex;</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; soci::blob sociBlob(session);</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; soci::indicator blobPresent;</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; </div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;SELECT ShardIndex, StoredLedgerSeqs &quot;</span></div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <span class="stringliteral">&quot;FROM Shard &quot;</span></div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; <span class="stringliteral">&quot;WHERE ShardIndex = :index;&quot;</span>,</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; soci::into(resIndex), soci::into(sociBlob, blobPresent),</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; soci::use(index);</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; </div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="keywordflow">if</span> (!resIndex || index != resIndex)</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">false</span>, {}};</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; </div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="keywordflow">if</span> (blobPresent != soci::i_ok)</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">true</span>, {}};</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; </div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> s;</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; <a class="code" href="namespaceripple.html#a60e89f0668645858d48dfd3f67b1a639">convert</a>(sociBlob, s);</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; </div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">true</span>, s};</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;}</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; </div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair&lt;bool, AcquireShardSeqsHash&gt;</a></div>
<div class="line"><a name="l00254"></a><span class="lineno"><a class="line" href="namespaceripple.html#a300cf0173f5bbe596e928a4689f0c3db"> 254</a></span>&#160;<a class="code" href="namespaceripple.html#a300cf0173f5bbe596e928a4689f0c3db">selectAcquireDBLedgerSeqsHash</a>(soci::session&amp; session, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> index)</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;{</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="comment">// resIndex and sHash0 must be boost::optional (not std) because that&#39;s</span></div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <span class="comment">// what SOCI expects in its interface.</span></div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; boost::optional&lt;std::uint32_t&gt; resIndex;</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; boost::optional&lt;std::string&gt; sHash0;</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; soci::blob sociBlob(session);</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; soci::indicator blobPresent;</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; </div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;SELECT ShardIndex, LastLedgerHash, StoredLedgerSeqs &quot;</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <span class="stringliteral">&quot;FROM Shard &quot;</span></div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="stringliteral">&quot;WHERE ShardIndex = :index;&quot;</span>,</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; soci::into(resIndex), soci::into(sHash0),</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; soci::into(sociBlob, blobPresent), soci::use(index);</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; </div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::string&gt;</a> sHash =</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; (sHash0 ? *sHash0 : <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::string&gt;</a>());</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; </div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; <span class="keywordflow">if</span> (!resIndex || index != resIndex)</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">false</span>, {{}, {}}};</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; </div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keywordflow">if</span> (blobPresent != soci::i_ok)</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">true</span>, {{}, sHash}};</div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; </div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> s;</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; <a class="code" href="namespaceripple.html#a60e89f0668645858d48dfd3f67b1a639">convert</a>(sociBlob, s);</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; </div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">true</span>, {s, sHash}};</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;}</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00285"></a><span class="lineno"><a class="line" href="namespaceripple.html#ad44314a03a131640e29655b190aad168"> 285</a></span>&#160;<a class="code" href="namespaceripple.html#ad44314a03a131640e29655b190aad168">updateAcquireDB</a>(</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; soci::session&amp; session,</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;Ledger const&gt;</a> <span class="keyword">const</span>&amp; ledger,</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> index,</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> lastSeq,</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::string&gt;</a> <span class="keyword">const</span>&amp; seqs)</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;{</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; soci::blob sociBlob(session);</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<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="l00294"></a><span class="lineno"> 294</span>&#160; </div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <span class="keywordflow">if</span> (seqs)</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <a class="code" href="namespaceripple.html#a60e89f0668645858d48dfd3f67b1a639">convert</a>(*seqs, sociBlob);</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; </div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="keywordflow">if</span> (ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a06608577034840a474361d55624ce9a0">seq</a> == lastSeq)</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; {</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; <span class="comment">// Store shard&#39;s last ledger hash</span></div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;UPDATE Shard &quot;</span></div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <span class="stringliteral">&quot;SET LastLedgerHash = :lastLedgerHash,&quot;</span></div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <span class="stringliteral">&quot;StoredLedgerSeqs = :storedLedgerSeqs &quot;</span></div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; <span class="stringliteral">&quot;WHERE ShardIndex = :shardIndex;&quot;</span>,</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; soci::use(sHash), soci::use(sociBlob), soci::use(index);</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; }</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; <span class="keywordflow">else</span></div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; {</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;UPDATE Shard &quot;</span></div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <span class="stringliteral">&quot;SET StoredLedgerSeqs = :storedLedgerSeqs &quot;</span></div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <span class="stringliteral">&quot;WHERE ShardIndex = :shardIndex;&quot;</span>,</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; soci::use(sociBlob), soci::use(index);</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; }</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160;}</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; </div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;} <span class="comment">// namespace ripple</span></div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<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="l00170"></a><span class="lineno"> 170</span>&#160; </div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="comment">// Update the ledger database</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; {</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="keyword">auto</span>&amp; session{lgrsession};</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; soci::transaction tr(session);</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; </div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sParentHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a5c129196edfd78e992f81959f075e5ca">parentHash</a>)};</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sDrops{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#ad789f949fc35acd576aac965b20aaaca">drops</a>)};</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sAccountHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#aadfc3fc0c7935a8705f3e9ab0c49b9d5">accountHash</a>)};</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sTxHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a1ddad764a35cb7eb22d0b4b62df047d5">txHash</a>)};</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; </div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;DELETE FROM Ledgers &quot;</span></div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="stringliteral">&quot;WHERE LedgerSeq = :seq;&quot;</span>,</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; soci::use(ledgerSeq);</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;INSERT OR REPLACE INTO Ledgers (&quot;</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="stringliteral">&quot;LedgerHash, LedgerSeq, PrevHash, TotalCoins, ClosingTime,&quot;</span></div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="stringliteral">&quot;PrevClosingTime, CloseTimeRes, CloseFlags, AccountSetHash,&quot;</span></div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="stringliteral">&quot;TransSetHash)&quot;</span></div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="stringliteral">&quot;VALUES (&quot;</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="stringliteral">&quot;:ledgerHash, :ledgerSeq, :prevHash, :totalCoins,&quot;</span></div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <span class="stringliteral">&quot;:closingTime, :prevClosingTime, :closeTimeRes,&quot;</span></div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="stringliteral">&quot;:closeFlags, :accountSetHash, :transSetHash);&quot;</span>,</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; soci::use(sHash), soci::use(ledgerSeq), soci::use(sParentHash),</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; soci::use(sDrops),</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; soci::use(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a8776d1f7ea49b0e25577f5610620c8fc">closeTime</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/time_point/time_since_epoch.html">time_since_epoch</a>().count()),</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; soci::use(</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a3f7b6fb6d401cfc76e0179b061e02eb4">parentCloseTime</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/time_point/time_since_epoch.html">time_since_epoch</a>().count()),</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; soci::use(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a069fa542e2614d0046eccbe54bae7976">closeTimeResolution</a>.<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration/count.html">count</a>()),</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; soci::use(ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a279f72e0664518d5fccd52ed7a92e0da">closeFlags</a>), soci::use(sAccountHash),</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; soci::use(sTxHash);</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; tr.commit();</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; }</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; </div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;}</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; </div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr&lt;DatabaseCon&gt;</a></div>
<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="namespaceripple.html#af2ba549aa6ef230d23f39a19ba2178b1"> 208</a></span>&#160;<a class="code" href="namespaceripple.html#af2ba549aa6ef230d23f39a19ba2178b1">makeAcquireDB</a>(</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <a class="code" href="structripple_1_1DatabaseCon_1_1Setup.html">DatabaseCon::Setup</a> <span class="keyword">const</span>&amp; setup,</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <a class="code" href="structripple_1_1DatabaseCon_1_1CheckpointerSetup.html">DatabaseCon::CheckpointerSetup</a> <span class="keyword">const</span>&amp; checkpointerSetup)</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;{</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <span class="keywordflow">return</span> std::make_unique&lt;DatabaseCon&gt;(</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; setup,</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <a class="code" href="namespaceripple.html#a47b009ed46b45fea7af9c99491bd5893">AcquireShardDBName</a>,</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <a class="code" href="namespaceripple.html#a402fe8f2f041bd9e3d2f74c5d1e02bcd">AcquireShardDBPragma</a>,</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <a class="code" href="namespaceripple.html#acddd432321b548db97019aa913d637d4">AcquireShardDBInit</a>,</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; checkpointerSetup);</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;}</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; </div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="namespaceripple.html#ae80496e603d320c1d84a42d1d9279362"> 221</a></span>&#160;<a class="code" href="namespaceripple.html#ae80496e603d320c1d84a42d1d9279362">insertAcquireDBIndex</a>(soci::session&amp; session, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> index)</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;{</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;INSERT INTO Shard (ShardIndex) &quot;</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="stringliteral">&quot;VALUES (:shardIndex);&quot;</span>,</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; soci::use(index);</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;}</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair&lt;bool, std::optional&lt;std::string&gt;</a>&gt;</div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="namespaceripple.html#ae10a9a71c9b7a05557edecd508ccfb94"> 229</a></span>&#160;<a class="code" href="namespaceripple.html#ae10a9a71c9b7a05557edecd508ccfb94">selectAcquireDBLedgerSeqs</a>(soci::session&amp; session, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> index)</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;{</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="comment">// resIndex and must be boost::optional (not std) because that&#39;s</span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <span class="comment">// what SOCI expects in its interface.</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; boost::optional&lt;std::uint32_t&gt; resIndex;</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; soci::blob sociBlob(session);</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; soci::indicator blobPresent;</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; </div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;SELECT ShardIndex, StoredLedgerSeqs &quot;</span></div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="stringliteral">&quot;FROM Shard &quot;</span></div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <span class="stringliteral">&quot;WHERE ShardIndex = :index;&quot;</span>,</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; soci::into(resIndex), soci::into(sociBlob, blobPresent),</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; soci::use(index);</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; </div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <span class="keywordflow">if</span> (!resIndex || index != resIndex)</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">false</span>, {}};</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; </div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">if</span> (blobPresent != soci::i_ok)</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">true</span>, {}};</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; </div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> s;</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <a class="code" href="namespaceripple.html#a60e89f0668645858d48dfd3f67b1a639">convert</a>(sociBlob, s);</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; </div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">true</span>, s};</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;}</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; </div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair&lt;bool, AcquireShardSeqsHash&gt;</a></div>
<div class="line"><a name="l00256"></a><span class="lineno"><a class="line" href="namespaceripple.html#a300cf0173f5bbe596e928a4689f0c3db"> 256</a></span>&#160;<a class="code" href="namespaceripple.html#a300cf0173f5bbe596e928a4689f0c3db">selectAcquireDBLedgerSeqsHash</a>(soci::session&amp; session, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> index)</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160;{</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <span class="comment">// resIndex and sHash0 must be boost::optional (not std) because that&#39;s</span></div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; <span class="comment">// what SOCI expects in its interface.</span></div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; boost::optional&lt;std::uint32_t&gt; resIndex;</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; boost::optional&lt;std::string&gt; sHash0;</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; soci::blob sociBlob(session);</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; soci::indicator blobPresent;</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; </div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;SELECT ShardIndex, LastLedgerHash, StoredLedgerSeqs &quot;</span></div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="stringliteral">&quot;FROM Shard &quot;</span></div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="stringliteral">&quot;WHERE ShardIndex = :index;&quot;</span>,</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; soci::into(resIndex), soci::into(sHash0),</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; soci::into(sociBlob, blobPresent), soci::use(index);</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; </div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::string&gt;</a> sHash =</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; (sHash0 ? *sHash0 : <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::string&gt;</a>());</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; </div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="keywordflow">if</span> (!resIndex || index != resIndex)</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">false</span>, {{}, {}}};</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; </div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; <span class="keywordflow">if</span> (blobPresent != soci::i_ok)</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">true</span>, {{}, sHash}};</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; </div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> s;</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <a class="code" href="namespaceripple.html#a60e89f0668645858d48dfd3f67b1a639">convert</a>(sociBlob, s);</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; </div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <span class="keywordflow">return</span> {<span class="keyword">true</span>, {s, sHash}};</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;}</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; </div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="namespaceripple.html#ad44314a03a131640e29655b190aad168"> 287</a></span>&#160;<a class="code" href="namespaceripple.html#ad44314a03a131640e29655b190aad168">updateAcquireDB</a>(</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; soci::session&amp; session,</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;Ledger const&gt;</a> <span class="keyword">const</span>&amp; ledger,</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> index,</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> lastSeq,</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt;std::string&gt;</a> <span class="keyword">const</span>&amp; seqs)</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160;{</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; soci::blob sociBlob(session);</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> sHash{<a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(ledger-&gt;<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="l00296"></a><span class="lineno"> 296</span>&#160; </div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; <span class="keywordflow">if</span> (seqs)</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <a class="code" href="namespaceripple.html#a60e89f0668645858d48dfd3f67b1a639">convert</a>(*seqs, sociBlob);</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; </div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; <span class="keywordflow">if</span> (ledger-&gt;<a class="code" href="classripple_1_1Ledger.html#a31a21cc451eaa0a5af304e2625dc75f5">info</a>().<a class="code" href="structripple_1_1LedgerInfo.html#a06608577034840a474361d55624ce9a0">seq</a> == lastSeq)</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; {</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <span class="comment">// Store shard&#39;s last ledger hash</span></div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;UPDATE Shard &quot;</span></div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; <span class="stringliteral">&quot;SET LastLedgerHash = :lastLedgerHash,&quot;</span></div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="stringliteral">&quot;StoredLedgerSeqs = :storedLedgerSeqs &quot;</span></div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="stringliteral">&quot;WHERE ShardIndex = :shardIndex;&quot;</span>,</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; soci::use(sHash), soci::use(sociBlob), soci::use(index);</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; }</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; <span class="keywordflow">else</span></div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; {</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; session &lt;&lt; <span class="stringliteral">&quot;UPDATE Shard &quot;</span></div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="stringliteral">&quot;SET StoredLedgerSeqs = :storedLedgerSeqs &quot;</span></div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="stringliteral">&quot;WHERE ShardIndex = :shardIndex;&quot;</span>,</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; soci::use(sociBlob), soci::use(index);</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; }</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;}</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; </div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160;} <span class="comment">// namespace ripple</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="anamespaceripple_html_a402fe8f2f041bd9e3d2f74c5d1e02bcd"><div class="ttname"><a href="namespaceripple.html#a402fe8f2f041bd9e3d2f74c5d1e02bcd">ripple::AcquireShardDBPragma</a></div><div class="ttdeci">constexpr std::array&lt; char const *, 1 &gt; AcquireShardDBPragma</div><div class="ttdef"><b>Definition:</b> <a href="DBInit_8h_source.html#l00198">DBInit.h:198</a></div></div>
<div class="ttc" id="anamespaceripple_html_a47b009ed46b45fea7af9c99491bd5893"><div class="ttname"><a href="namespaceripple.html#a47b009ed46b45fea7af9c99491bd5893">ripple::AcquireShardDBName</a></div><div class="ttdeci">constexpr auto AcquireShardDBName</div><div class="ttdef"><b>Definition:</b> <a href="DBInit_8h_source.html#l00196">DBInit.h:196</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#l00621">SHAMap.h:621</a></div></div>
<div class="ttc" id="anamespaceripple_html_af2ba549aa6ef230d23f39a19ba2178b1"><div class="ttname"><a href="namespaceripple.html#af2ba549aa6ef230d23f39a19ba2178b1">ripple::makeAcquireDB</a></div><div class="ttdeci">std::unique_ptr&lt; DatabaseCon &gt; makeAcquireDB(DatabaseCon::Setup const &amp;setup, DatabaseCon::CheckpointerSetup const &amp;checkpointerSetup)</div><div class="ttdoc">makeAcquireDB Opens the shard acquire database and returns its descriptor.</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00206">UnitaryShard.cpp:206</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#l00625">SHAMap.h:625</a></div></div>
<div class="ttc" id="anamespaceripple_html_af2ba549aa6ef230d23f39a19ba2178b1"><div class="ttname"><a href="namespaceripple.html#af2ba549aa6ef230d23f39a19ba2178b1">ripple::makeAcquireDB</a></div><div class="ttdeci">std::unique_ptr&lt; DatabaseCon &gt; makeAcquireDB(DatabaseCon::Setup const &amp;setup, DatabaseCon::CheckpointerSetup const &amp;checkpointerSetup)</div><div class="ttdoc">makeAcquireDB Opens the shard acquire database and returns its descriptor.</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00208">UnitaryShard.cpp:208</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="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="astructripple_1_1LedgerInfo_html_a5c129196edfd78e992f81959f075e5ca"><div class="ttname"><a href="structripple_1_1LedgerInfo.html#a5c129196edfd78e992f81959f075e5ca">ripple::LedgerInfo::parentHash</a></div><div class="ttdeci">uint256 parentHash</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00094">ReadView.h:94</a></div></div>
@@ -402,8 +404,8 @@ $(function() {
<div class="ttc" id="areserve_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/reserve.html">std::string::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#l00091">ReadView.h:91</a></div></div>
<div class="ttc" id="anamespaceripple_html_a60e89f0668645858d48dfd3f67b1a639"><div class="ttname"><a href="namespaceripple.html#a60e89f0668645858d48dfd3f67b1a639">ripple::convert</a></div><div class="ttdeci">void convert(soci::blob &amp;from, std::vector&lt; std::uint8_t &gt; &amp;to)</div><div class="ttdef"><b>Definition:</b> <a href="SociDB_8cpp_source.html#l00154">SociDB.cpp:154</a></div></div>
<div class="ttc" id="anamespaceripple_html_a300cf0173f5bbe596e928a4689f0c3db"><div class="ttname"><a href="namespaceripple.html#a300cf0173f5bbe596e928a4689f0c3db">ripple::selectAcquireDBLedgerSeqsHash</a></div><div class="ttdeci">std::pair&lt; bool, AcquireShardSeqsHash &gt; selectAcquireDBLedgerSeqsHash(soci::session &amp;session, std::uint32_t index)</div><div class="ttdoc">selectAcquireDBLedgerSeqsHash Returns the set of acquired ledger sequences and the last ledger hash f...</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00254">UnitaryShard.cpp:254</a></div></div>
<div class="ttc" id="anamespaceripple_html_ae80496e603d320c1d84a42d1d9279362"><div class="ttname"><a href="namespaceripple.html#ae80496e603d320c1d84a42d1d9279362">ripple::insertAcquireDBIndex</a></div><div class="ttdeci">void insertAcquireDBIndex(soci::session &amp;session, std::uint32_t index)</div><div class="ttdoc">insertAcquireDBIndex Adds a new shard index to the shard acquire database.</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00219">UnitaryShard.cpp:219</a></div></div>
<div class="ttc" id="anamespaceripple_html_a300cf0173f5bbe596e928a4689f0c3db"><div class="ttname"><a href="namespaceripple.html#a300cf0173f5bbe596e928a4689f0c3db">ripple::selectAcquireDBLedgerSeqsHash</a></div><div class="ttdeci">std::pair&lt; bool, AcquireShardSeqsHash &gt; selectAcquireDBLedgerSeqsHash(soci::session &amp;session, std::uint32_t index)</div><div class="ttdoc">selectAcquireDBLedgerSeqsHash Returns the set of acquired ledger sequences and the last ledger hash f...</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00256">UnitaryShard.cpp:256</a></div></div>
<div class="ttc" id="anamespaceripple_html_ae80496e603d320c1d84a42d1d9279362"><div class="ttname"><a href="namespaceripple.html#ae80496e603d320c1d84a42d1d9279362">ripple::insertAcquireDBIndex</a></div><div class="ttdeci">void insertAcquireDBIndex(soci::session &amp;session, std::uint32_t index)</div><div class="ttdoc">insertAcquireDBIndex Adds a new shard index to the shard acquire database.</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00221">UnitaryShard.cpp:221</a></div></div>
<div class="ttc" id="anamespaceripple_html_a08a13b62b18272366f788632359e8793"><div class="ttname"><a href="namespaceripple.html#a08a13b62b18272366f788632359e8793">ripple::toBase58</a></div><div class="ttdeci">std::string toBase58(AccountID const &amp;v)</div><div class="ttdoc">Convert AccountID to base58 checked string.</div><div class="ttdef"><b>Definition:</b> <a href="AccountID_8cpp_source.html#l00104">AccountID.cpp:104</a></div></div>
<div class="ttc" id="astructripple_1_1DatabaseCon_1_1CheckpointerSetup_html"><div class="ttname"><a href="structripple_1_1DatabaseCon_1_1CheckpointerSetup.html">ripple::DatabaseCon::CheckpointerSetup</a></div><div class="ttdef"><b>Definition:</b> <a href="DatabaseCon_8h_source.html#l00107">DatabaseCon.h:107</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>
@@ -413,15 +415,17 @@ $(function() {
<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#l00083">ReadView.h:83</a></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#l00092">ReadView.h:92</a></div></div>
<div class="ttc" id="anamespaceripple_html_a64fa9e3b8efc330083f5073754cb0c4c"><div class="ttname"><a href="namespaceripple.html#a64fa9e3b8efc330083f5073754cb0c4c">ripple::LgrDBInit</a></div><div class="ttdeci">constexpr std::array&lt; char const *, 5 &gt; LgrDBInit</div><div class="ttdef"><b>Definition:</b> <a href="DBInit_8h_source.html#l00048">DBInit.h:48</a></div></div>
<div class="ttc" id="aclassripple_1_1TxMeta_html"><div class="ttname"><a href="classripple_1_1TxMeta.html">ripple::TxMeta</a></div><div class="ttdef"><b>Definition:</b> <a href="TxMeta_8h_source.html#l00032">TxMeta.h:32</a></div></div>
<div class="ttc" id="astructripple_1_1LedgerInfo_html_a8776d1f7ea49b0e25577f5610620c8fc"><div class="ttname"><a href="structripple_1_1LedgerInfo.html#a8776d1f7ea49b0e25577f5610620c8fc">ripple::LedgerInfo::closeTime</a></div><div class="ttdeci">NetClock::time_point closeTime</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00114">ReadView.h:114</a></div></div>
<div class="ttc" id="anamespaceripple_html_aaeddb4a3396c616a7ef7350e4cc327f0"><div class="ttname"><a href="namespaceripple.html#aaeddb4a3396c616a7ef7350e4cc327f0">ripple::TxDBName</a></div><div class="ttdeci">constexpr auto TxDBName</div><div class="ttdef"><b>Definition:</b> <a href="DBInit_8h_source.html#l00073">DBInit.h:73</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</a></div><div class="ttdoc">Integers of any length that is a multiple of 32-bits.</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00082">base_uint.h:82</a></div></div>
<div class="ttc" id="anamespaceripple_html_ad44314a03a131640e29655b190aad168"><div class="ttname"><a href="namespaceripple.html#ad44314a03a131640e29655b190aad168">ripple::updateAcquireDB</a></div><div class="ttdeci">void updateAcquireDB(soci::session &amp;session, std::shared_ptr&lt; Ledger const &gt; const &amp;ledger, std::uint32_t index, std::uint32_t lastSeq, std::optional&lt; std::string &gt; const &amp;seqs)</div><div class="ttdoc">updateAcquireDB Updates information in the acquire DB.</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00285">UnitaryShard.cpp:285</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 &amp; 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#l00148">Ledger.h:148</a></div></div>
<div class="ttc" id="anamespaceripple_html_ad44314a03a131640e29655b190aad168"><div class="ttname"><a href="namespaceripple.html#ad44314a03a131640e29655b190aad168">ripple::updateAcquireDB</a></div><div class="ttdeci">void updateAcquireDB(soci::session &amp;session, std::shared_ptr&lt; Ledger const &gt; const &amp;ledger, std::uint32_t index, std::uint32_t lastSeq, std::optional&lt; std::string &gt; const &amp;seqs)</div><div class="ttdoc">updateAcquireDB Updates information in the acquire DB.</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00287">UnitaryShard.cpp:287</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 &amp; 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#l00152">Ledger.h:152</a></div></div>
<div class="ttc" id="atime_since_epoch_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/time_point/time_since_epoch.html">std::chrono::time_point::time_since_epoch</a></div><div class="ttdeci">T time_since_epoch(T... args)</div></div>
<div class="ttc" id="anamespaceripple_html_a076d4f6f5b4dbe69103fb54a69b98324"><div class="ttname"><a href="namespaceripple.html#a076d4f6f5b4dbe69103fb54a69b98324">ripple::isPseudoTx</a></div><div class="ttdeci">bool isPseudoTx(STObject const &amp;tx)</div><div class="ttdoc">Check whether a transaction is a pseudo-transaction.</div><div class="ttdef"><b>Definition:</b> <a href="STTx_8cpp_source.html#l00559">STTx.cpp:559</a></div></div>
<div class="ttc" id="aclassripple_1_1Config_html_abe2b226bd6705b7010feb45f66363142"><div class="ttname"><a href="classripple_1_1Config.html#abe2b226bd6705b7010feb45f66363142">ripple::Config::getValueFor</a></div><div class="ttdeci">int getValueFor(SizedItem item, std::optional&lt; std::size_t &gt; node=std::nullopt) const</div><div class="ttdoc">Retrieve the default value for the item at the specified node size.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8cpp_source.html#l01010">Config.cpp:1010</a></div></div>
<div class="ttc" id="anamespaceripple_html_a7cb82a436e3400fa3a0d4f7a5c453425"><div class="ttname"><a href="namespaceripple.html#a7cb82a436e3400fa3a0d4f7a5c453425">ripple::LgrDBPragma</a></div><div class="ttdeci">constexpr std::array&lt; char const *, 1 &gt; LgrDBPragma</div><div class="ttdef"><b>Definition:</b> <a href="DBInit_8h_source.html#l00045">DBInit.h:45</a></div></div>
<div class="ttc" id="aload_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/atomic/atomic/load.html">std::atomic::load</a></div><div class="ttdeci">T load(T... args)</div></div>
<div class="ttc" id="aclassripple_1_1Config_html"><div class="ttname"><a href="classripple_1_1Config.html">ripple::Config</a></div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00089">Config.h:89</a></div></div>
<div class="ttc" id="astructripple_1_1LedgerInfo_html_a279f72e0664518d5fccd52ed7a92e0da"><div class="ttname"><a href="structripple_1_1LedgerInfo.html#a279f72e0664518d5fccd52ed7a92e0da">ripple::LedgerInfo::closeFlags</a></div><div class="ttdeci">int closeFlags</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00105">ReadView.h:105</a></div></div>
<div class="ttc" id="ato_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a></div><div class="ttdeci">T to_string(T... args)</div></div>
@@ -434,7 +438,7 @@ $(function() {
<div class="ttc" id="anamespaceripple_html_abbb0363f7903f2434ca6325a988465fb"><div class="ttname"><a href="namespaceripple.html#abbb0363f7903f2434ca6325a988465fb">ripple::FinalShardDBPragma</a></div><div class="ttdeci">constexpr std::array&lt; char const *, 2 &gt; FinalShardDBPragma</div><div class="ttdef"><b>Definition:</b> <a href="DBInit_8h_source.html#l00212">DBInit.h:212</a></div></div>
<div class="ttc" id="astructripple_1_1LedgerInfo_html_ad789f949fc35acd576aac965b20aaaca"><div class="ttname"><a href="structripple_1_1LedgerInfo.html#ad789f949fc35acd576aac965b20aaaca">ripple::LedgerInfo::drops</a></div><div class="ttdeci">XRPAmount drops</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00096">ReadView.h:96</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 &amp; txMap() const</div><div class="ttdef"><b>Definition:</b> <a href="Ledger_8h_source.html#l00318">Ledger.h:318</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 &amp; txMap() const</div><div class="ttdef"><b>Definition:</b> <a href="Ledger_8h_source.html#l00322">Ledger.h:322</a></div></div>
<div class="ttc" id="anamespaceripple_html_a6ad74922128ff3dab9af302389b29e01"><div class="ttname"><a href="namespaceripple.html#a6ad74922128ff3dab9af302389b29e01">ripple::updateLedgerDBs</a></div><div class="ttdeci">bool updateLedgerDBs(soci::session &amp;txsession, soci::session &amp;lgrsession, std::shared_ptr&lt; Ledger const &gt; const &amp;ledger, std::uint32_t index, std::atomic&lt; bool &gt; &amp;stop, beast::Journal j)</div><div class="ttdoc">updateLedgerDBs Saves the given ledger to shard databases.</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00071">UnitaryShard.cpp:71</a></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_1ReadView_html_ac284afc905c482953c35c61b459fd85b"><div class="ttname"><a href="classripple_1_1ReadView.html#ac284afc905c482953c35c61b459fd85b">ripple::ReadView::seq</a></div><div class="ttdeci">LedgerIndex seq() const</div><div class="ttdoc">Returns the sequence number of the base ledger.</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00193">ReadView.h:193</a></div></div>
@@ -443,7 +447,7 @@ $(function() {
<div class="ttc" id="anamespaceripple_html_a3239662b6259e89c292143a915714934"><div class="ttname"><a href="namespaceripple.html#a3239662b6259e89c292143a915714934">ripple::makeShardIncompleteLedgerDBs</a></div><div class="ttdeci">DatabasePair makeShardIncompleteLedgerDBs(Config const &amp;config, DatabaseCon::Setup const &amp;setup, DatabaseCon::CheckpointerSetup const &amp;checkpointerSetup)</div><div class="ttdoc">makeShardIncompleteLedgerDBs Opens shard databases for partially downloaded or unverified shards and ...</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00048">UnitaryShard.cpp:48</a></div></div>
<div class="ttc" id="aoptional_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional&lt; std::string &gt;</a></div></div>
<div class="ttc" id="anamespaceripple_html_af9776f187d3686a7fba4c2d2fbeebdf4"><div class="ttname"><a href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">ripple::to_string</a></div><div class="ttdeci">std::string to_string(Manifest const &amp;m)</div><div class="ttdoc">Format the specified manifest to a string for debugging purposes.</div><div class="ttdef"><b>Definition:</b> <a href="app_2misc_2impl_2Manifest_8cpp_source.html#l00041">app/misc/impl/Manifest.cpp:41</a></div></div>
<div class="ttc" id="anamespaceripple_html_ae10a9a71c9b7a05557edecd508ccfb94"><div class="ttname"><a href="namespaceripple.html#ae10a9a71c9b7a05557edecd508ccfb94">ripple::selectAcquireDBLedgerSeqs</a></div><div class="ttdeci">std::pair&lt; bool, std::optional&lt; std::string &gt; &gt; selectAcquireDBLedgerSeqs(soci::session &amp;session, std::uint32_t index)</div><div class="ttdoc">selectAcquireDBLedgerSeqs Returns the set of acquired ledgers for the given shard.</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00227">UnitaryShard.cpp:227</a></div></div>
<div class="ttc" id="anamespaceripple_html_ae10a9a71c9b7a05557edecd508ccfb94"><div class="ttname"><a href="namespaceripple.html#ae10a9a71c9b7a05557edecd508ccfb94">ripple::selectAcquireDBLedgerSeqs</a></div><div class="ttdeci">std::pair&lt; bool, std::optional&lt; std::string &gt; &gt; selectAcquireDBLedgerSeqs(soci::session &amp;session, std::uint32_t index)</div><div class="ttdoc">selectAcquireDBLedgerSeqs Returns the set of acquired ledgers for the given shard.</div><div class="ttdef"><b>Definition:</b> <a href="UnitaryShard_8cpp_source.html#l00229">UnitaryShard.cpp:229</a></div></div>
<div class="ttc" id="anamespaceripple_html_a02dace5f2b8af172e9d2d4ee7ea04c55"><div class="ttname"><a href="namespaceripple.html#a02dace5f2b8af172e9d2d4ee7ea04c55">ripple::TxDBInit</a></div><div class="ttdeci">constexpr std::array&lt; char const *, 8 &gt; TxDBInit</div><div class="ttdef"><b>Definition:</b> <a href="DBInit_8h_source.html#l00094">DBInit.h:94</a></div></div>
<div class="ttc" id="aunique_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="anamespaceripple_html_a9078e51480fd85c4bff715ecd3f141d5"><div class="ttname"><a href="namespaceripple.html#a9078e51480fd85c4bff715ecd3f141d5">ripple::sqlBlobLiteral</a></div><div class="ttdeci">std::string sqlBlobLiteral(Blob const &amp;blob)</div><div class="ttdoc">Format arbitrary binary data as an SQLite &quot;blob literal&quot;.</div><div class="ttdef"><b>Definition:</b> <a href="StringUtilities_8cpp_source.html#l00033">StringUtilities.cpp:33</a></div></div>