mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 15:35:50 +00:00
deploy: 305c9a8d61
This commit is contained in:
@@ -285,170 +285,188 @@ $(function() {
|
||||
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordflow">if</span> ((*sleAccount)[<a class="code" href="namespaceripple.html#a586714bf3cbbbb406d6f169742bce0d5">sfSequence</a>] + seqDelta > ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>.<a class="code" href="classripple_1_1ReadView.html#ac284afc905c482953c35c61b459fd85b">seq</a>())</div>
|
||||
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca44bd180d908c1a35ffd236f7c88c180c">tecTOO_SOON</a>;</div>
|
||||
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  </div>
|
||||
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="comment">// Verify that the account does not own any objects that would prevent</span></div>
|
||||
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="comment">// the account from being deleted.</span></div>
|
||||
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="structripple_1_1Keylet.html">Keylet</a> <span class="keyword">const</span> ownerDirKeylet{<a class="code" href="namespaceripple_1_1keylet.html#aa9b2ba2df3c3da4cecd1c07cccf7c7f9">keylet::ownerDir</a>(account)};</div>
|
||||
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceripple.html#af10fd1df5a0f8f32f4bfd9f07b0c3596">dirIsEmpty</a>(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>, ownerDirKeylet))</div>
|
||||
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>;</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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<SLE const></a> sleDirNode{};</div>
|
||||
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> uDirEntry{0};</div>
|
||||
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> dirEntry{beast::zero};</div>
|
||||
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  </div>
|
||||
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="comment">// Account has no directory at all. This _should_ have been caught</span></div>
|
||||
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="comment">// by the dirIsEmpty() check earlier, but it's okay to catch it here.</span></div>
|
||||
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keywordflow">if</span> (!<a class="code" href="namespaceripple.html#a206bfc3d5fcad44ece8cab528ccf48ba">cdirFirst</a>(</div>
|
||||
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>, ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry))</div>
|
||||
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>;</div>
|
||||
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  </div>
|
||||
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> deletableDirEntryCount{0};</div>
|
||||
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keywordflow">do</span></div>
|
||||
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  {</div>
|
||||
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="comment">// Make sure any directory node types that we find are the kind</span></div>
|
||||
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="comment">// we can delete.</span></div>
|
||||
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keyword">auto</span> sleItem = ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>.<a class="code" href="classripple_1_1ReadView.html#a3351e0244f921234d5ba005a07ddf539">read</a>(<a class="code" href="namespaceripple_1_1keylet.html#a1fc176ed1b328b0ef5392b5b5468e269">keylet::child</a>(dirEntry));</div>
|
||||
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keywordflow">if</span> (!sleItem)</div>
|
||||
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  {</div>
|
||||
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="comment">// Directory node has an invalid index. Bail out.</span></div>
|
||||
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>())</div>
|
||||
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  << <span class="stringliteral">"DeleteAccount: directory node in ledger "</span> << ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>.<a class="code" href="classripple_1_1ReadView.html#ac284afc905c482953c35c61b459fd85b">seq</a>()</div>
|
||||
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  << <span class="stringliteral">" has index to object that is missing: "</span></div>
|
||||
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  << <a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(dirEntry);</div>
|
||||
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</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>  </div>
|
||||
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <a class="code" href="namespaceripple.html#ac151bf19e1f4daae2b04c65c65117139">LedgerEntryType</a> <span class="keyword">const</span> nodeType{</div>
|
||||
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  safe_cast<LedgerEntryType>((*sleItem)[<a class="code" href="namespaceripple.html#a95e082491139cffc65c01b6fcaa3edfe">sfLedgerEntryType</a>])};</div>
|
||||
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  </div>
|
||||
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keywordflow">if</span> (!nonObligationDeleter(nodeType))</div>
|
||||
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caa7460a5fac26c1d8abef55b8c1129150">tecHAS_OBLIGATIONS</a>;</div>
|
||||
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  </div>
|
||||
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="comment">// We found a deletable directory entry. Count it. If we find too</span></div>
|
||||
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="comment">// many deletable directory entries then bail out.</span></div>
|
||||
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordflow">if</span> (++deletableDirEntryCount > <a class="code" href="namespaceripple.html#a519987bb9222b0ff24629339de05771a">maxDeletableDirEntries</a>)</div>
|
||||
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ac88fc0c8fed663cca3ccde623c0f3057">tefTOO_BIG</a>;</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>  } <span class="keywordflow">while</span> (<a class="code" href="namespaceripple.html#a9c4dd9876685de738163e6ddb7ae498f">cdirNext</a>(</div>
|
||||
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>, ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry));</div>
|
||||
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  </div>
|
||||
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>;</div>
|
||||
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span> }</div>
|
||||
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="comment">// When fixNFTokenRemint is enabled, we don't allow an account to be</span></div>
|
||||
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="comment">// deleted if <FirstNFTokenSequence + MintedNFTokens> is within 256 of the</span></div>
|
||||
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="comment">// current ledger. This is to prevent having duplicate NFTokenIDs after</span></div>
|
||||
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="comment">// account re-creation.</span></div>
|
||||
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="comment">// Without this restriction, duplicate NFTokenIDs can be reproduced when</span></div>
|
||||
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="comment">// authorized minting is involved. Because when the minter mints a NFToken,</span></div>
|
||||
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="comment">// the issuer's sequence does not change. So when the issuer re-creates</span></div>
|
||||
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="comment">// their account and mints a NFToken, it is possible that the</span></div>
|
||||
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="comment">// NFTokenSequence of this NFToken is the same as the one that the</span></div>
|
||||
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="comment">// authorized minter minted in a previous ledger.</span></div>
|
||||
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">if</span> (ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>.<a class="code" href="classripple_1_1ReadView.html#aaf2fa03be723bb78d8bdf41614a75a30">rules</a>().<a class="code" href="classripple_1_1Rules.html#a1a8388a2b9588aa9446ece92a88e0dd2">enabled</a>(<a class="code" href="namespaceripple.html#a2abe44fcd04710b216e3f9f774e4849d">fixNFTokenRemint</a>) &&</div>
|
||||
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  ((*sleAccount)[~<a class="code" href="namespaceripple.html#a7ed79af90f5252a74ae12db6aebc1d89">sfFirstNFTokenSequence</a>].value_or(0) +</div>
|
||||
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  (*sleAccount)[~<a class="code" href="namespaceripple.html#a6d7b8e9e6bc61d5f9da0611cf70c66fc">sfMintedNFTokens</a>].value_or(0) + seqDelta ></div>
|
||||
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>.<a class="code" href="classripple_1_1ReadView.html#ac284afc905c482953c35c61b459fd85b">seq</a>()))</div>
|
||||
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca44bd180d908c1a35ffd236f7c88c180c">tecTOO_SOON</a>;</div>
|
||||
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  </div>
|
||||
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="comment">// Verify that the account does not own any objects that would prevent</span></div>
|
||||
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="comment">// the account from being deleted.</span></div>
|
||||
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <a class="code" href="structripple_1_1Keylet.html">Keylet</a> <span class="keyword">const</span> ownerDirKeylet{<a class="code" href="namespaceripple_1_1keylet.html#aa9b2ba2df3c3da4cecd1c07cccf7c7f9">keylet::ownerDir</a>(account)};</div>
|
||||
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceripple.html#af10fd1df5a0f8f32f4bfd9f07b0c3596">dirIsEmpty</a>(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>, ownerDirKeylet))</div>
|
||||
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<SLE const></a> sleDirNode{};</div>
|
||||
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> uDirEntry{0};</div>
|
||||
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> dirEntry{beast::zero};</div>
|
||||
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  </div>
|
||||
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <span class="comment">// Account has no directory at all. This _should_ have been caught</span></div>
|
||||
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="comment">// by the dirIsEmpty() check earlier, but it's okay to catch it here.</span></div>
|
||||
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="keywordflow">if</span> (!<a class="code" href="namespaceripple.html#a206bfc3d5fcad44ece8cab528ccf48ba">cdirFirst</a>(</div>
|
||||
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>, ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry))</div>
|
||||
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>;</div>
|
||||
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  </div>
|
||||
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> deletableDirEntryCount{0};</div>
|
||||
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keywordflow">do</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>  <span class="comment">// Make sure any directory node types that we find are the kind</span></div>
|
||||
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="comment">// we can delete.</span></div>
|
||||
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keyword">auto</span> sleItem = ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>.<a class="code" href="classripple_1_1ReadView.html#a3351e0244f921234d5ba005a07ddf539">read</a>(<a class="code" href="namespaceripple_1_1keylet.html#a1fc176ed1b328b0ef5392b5b5468e269">keylet::child</a>(dirEntry));</div>
|
||||
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keywordflow">if</span> (!sleItem)</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="comment">// Directory node has an invalid index. Bail out.</span></div>
|
||||
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>())</div>
|
||||
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  << <span class="stringliteral">"DeleteAccount: directory node in ledger "</span> << ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>.<a class="code" href="classripple_1_1ReadView.html#ac284afc905c482953c35c61b459fd85b">seq</a>()</div>
|
||||
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  << <span class="stringliteral">" has index to object that is missing: "</span></div>
|
||||
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  << <a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(dirEntry);</div>
|
||||
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</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>  </div>
|
||||
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span> <a class="code" href="classripple_1_1TERSubset.html">TER</a></div>
|
||||
<div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="classripple_1_1DeleteAccount.html#a8d6dbc29edb43295ca2fa2e2215e7ba2"> 267</a></span> <a class="code" href="classripple_1_1DeleteAccount.html#a8d6dbc29edb43295ca2fa2e2215e7ba2">DeleteAccount::doApply</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="keyword">auto</span> src = <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#aad9fb1233dec10dcc10c2e3b1da6a723">peek</a>(<a class="code" href="namespaceripple_1_1keylet.html#a50c370db96b4fdcdd202d9c2c38afce9">keylet::account</a>(<a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>));</div>
|
||||
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  assert(src);</div>
|
||||
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <a class="code" href="namespaceripple.html#ac151bf19e1f4daae2b04c65c65117139">LedgerEntryType</a> <span class="keyword">const</span> nodeType{</div>
|
||||
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  safe_cast<LedgerEntryType>((*sleItem)[<a class="code" href="namespaceripple.html#a95e082491139cffc65c01b6fcaa3edfe">sfLedgerEntryType</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="keywordflow">if</span> (!nonObligationDeleter(nodeType))</div>
|
||||
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caa7460a5fac26c1d8abef55b8c1129150">tecHAS_OBLIGATIONS</a>;</div>
|
||||
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  </div>
|
||||
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keyword">auto</span> dst = <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#aad9fb1233dec10dcc10c2e3b1da6a723">peek</a>(<a class="code" href="namespaceripple_1_1keylet.html#a50c370db96b4fdcdd202d9c2c38afce9">keylet::account</a>(<a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#a8c8757b3b1f88baef47b31ed4e9682d0">tx</a>[<a class="code" href="namespaceripple.html#a15aa3b3032d0908932dc5abf4b1ef862">sfDestination</a>]));</div>
|
||||
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  assert(dst);</div>
|
||||
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  </div>
|
||||
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keywordflow">if</span> (!src || !dst)</div>
|
||||
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</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>  <span class="comment">// Delete all of the entries in the account directory.</span></div>
|
||||
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <a class="code" href="structripple_1_1Keylet.html">Keylet</a> <span class="keyword">const</span> ownerDirKeylet{<a class="code" href="namespaceripple_1_1keylet.html#aa9b2ba2df3c3da4cecd1c07cccf7c7f9">keylet::ownerDir</a>(<a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>)};</div>
|
||||
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<SLE></a> sleDirNode{};</div>
|
||||
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> uDirEntry{0};</div>
|
||||
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> dirEntry{beast::zero};</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>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().exists(ownerDirKeylet) &&</div>
|
||||
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <a class="code" href="namespaceripple.html#a34251c908a52d50d055160c19d6e6e56">dirFirst</a>(<a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>(), ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry))</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>  <span class="keywordflow">do</span></div>
|
||||
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  {</div>
|
||||
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="comment">// Choose the right way to delete each directory node.</span></div>
|
||||
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keyword">auto</span> sleItem = <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#aad9fb1233dec10dcc10c2e3b1da6a723">peek</a>(<a class="code" href="namespaceripple_1_1keylet.html#a1fc176ed1b328b0ef5392b5b5468e269">keylet::child</a>(dirEntry));</div>
|
||||
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keywordflow">if</span> (!sleItem)</div>
|
||||
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  {</div>
|
||||
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="comment">// Directory node has an invalid index. Bail out.</span></div>
|
||||
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>())</div>
|
||||
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  << <span class="stringliteral">"DeleteAccount: Directory node in ledger "</span></div>
|
||||
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  << <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ReadView.html#ac284afc905c482953c35c61b459fd85b">seq</a>() << <span class="stringliteral">" has index to object that is missing: "</span></div>
|
||||
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  << <a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(dirEntry);</div>
|
||||
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</div>
|
||||
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  }</div>
|
||||
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="comment">// We found a deletable directory entry. Count it. If we find too</span></div>
|
||||
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="comment">// many deletable directory entries then bail out.</span></div>
|
||||
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keywordflow">if</span> (++deletableDirEntryCount > <a class="code" href="namespaceripple.html#a519987bb9222b0ff24629339de05771a">maxDeletableDirEntries</a>)</div>
|
||||
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ac88fc0c8fed663cca3ccde623c0f3057">tefTOO_BIG</a>;</div>
|
||||
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  </div>
|
||||
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  } <span class="keywordflow">while</span> (<a class="code" href="namespaceripple.html#a9c4dd9876685de738163e6ddb7ae498f">cdirNext</a>(</div>
|
||||
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>, ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry));</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">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>;</div>
|
||||
<div class="line"><a name="l00281"></a><span class="lineno"> 281</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> <a class="code" href="classripple_1_1TERSubset.html">TER</a></div>
|
||||
<div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="classripple_1_1DeleteAccount.html#a8d6dbc29edb43295ca2fa2e2215e7ba2"> 284</a></span> <a class="code" href="classripple_1_1DeleteAccount.html#a8d6dbc29edb43295ca2fa2e2215e7ba2">DeleteAccount::doApply</a>()</div>
|
||||
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span> {</div>
|
||||
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keyword">auto</span> src = <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#aad9fb1233dec10dcc10c2e3b1da6a723">peek</a>(<a class="code" href="namespaceripple_1_1keylet.html#a50c370db96b4fdcdd202d9c2c38afce9">keylet::account</a>(<a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>));</div>
|
||||
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  assert(src);</div>
|
||||
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  </div>
|
||||
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="keyword">auto</span> dst = <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#aad9fb1233dec10dcc10c2e3b1da6a723">peek</a>(<a class="code" href="namespaceripple_1_1keylet.html#a50c370db96b4fdcdd202d9c2c38afce9">keylet::account</a>(<a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#a8c8757b3b1f88baef47b31ed4e9682d0">tx</a>[<a class="code" href="namespaceripple.html#a15aa3b3032d0908932dc5abf4b1ef862">sfDestination</a>]));</div>
|
||||
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  assert(dst);</div>
|
||||
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  </div>
|
||||
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordflow">if</span> (!src || !dst)</div>
|
||||
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</div>
|
||||
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  </div>
|
||||
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="comment">// Delete all of the entries in the account directory.</span></div>
|
||||
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <a class="code" href="structripple_1_1Keylet.html">Keylet</a> <span class="keyword">const</span> ownerDirKeylet{<a class="code" href="namespaceripple_1_1keylet.html#aa9b2ba2df3c3da4cecd1c07cccf7c7f9">keylet::ownerDir</a>(<a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>)};</div>
|
||||
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<SLE></a> sleDirNode{};</div>
|
||||
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> uDirEntry{0};</div>
|
||||
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> dirEntry{beast::zero};</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>  <a class="code" href="namespaceripple.html#ac151bf19e1f4daae2b04c65c65117139">LedgerEntryType</a> <span class="keyword">const</span> nodeType{safe_cast<LedgerEntryType>(</div>
|
||||
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  sleItem->getFieldU16(<a class="code" href="namespaceripple.html#a95e082491139cffc65c01b6fcaa3edfe">sfLedgerEntryType</a>))};</div>
|
||||
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  </div>
|
||||
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keywordflow">if</span> (<span class="keyword">auto</span> deleter = nonObligationDeleter(nodeType))</div>
|
||||
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  {</div>
|
||||
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <a class="code" href="classripple_1_1TERSubset.html">TER</a> <span class="keyword">const</span> result{</div>
|
||||
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  deleter(<a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#a6ec1f10e560afe30ed435c3f7eea715d">app</a>, <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>(), <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>, dirEntry, sleItem, <a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</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="keywordflow">if</span> (!<a class="code" href="namespaceripple.html#a5b31f337f444082f547ef1838e7064fc">isTesSuccess</a>(result))</div>
|
||||
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  }</div>
|
||||
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  {</div>
|
||||
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  assert(!<span class="stringliteral">"Undeletable entry should be found in preclaim."</span>);</div>
|
||||
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>())</div>
|
||||
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  << <span class="stringliteral">"DeleteAccount undeletable item not found in preclaim."</span>;</div>
|
||||
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caa7460a5fac26c1d8abef55b8c1129150">tecHAS_OBLIGATIONS</a>;</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>  </div>
|
||||
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <span class="comment">// dirFirst() and dirNext() are like iterators with exposed</span></div>
|
||||
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  <span class="comment">// internal state. We'll take advantage of that exposed state</span></div>
|
||||
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="comment">// to solve a common C++ problem: iterator invalidation while</span></div>
|
||||
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <span class="comment">// deleting elements from a container.</span></div>
|
||||
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  <span class="comment">// We have just deleted one directory entry, which means our</span></div>
|
||||
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="comment">// "iterator state" is invalid.</span></div>
|
||||
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  <span class="comment">// 1. During the process of getting an entry from the</span></div>
|
||||
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  <span class="comment">// directory uDirEntry was incremented from 0 to 1.</span></div>
|
||||
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <span class="comment">// 2. We then deleted the entry at index 0, which means the</span></div>
|
||||
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <span class="comment">// entry that was at 1 has now moved to 0.</span></div>
|
||||
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="comment">// 3. So we verify that uDirEntry is indeed 1. Then we jam it</span></div>
|
||||
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <span class="comment">// back to zero to "un-invalidate" the iterator.</span></div>
|
||||
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  assert(uDirEntry == 1);</div>
|
||||
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <span class="keywordflow">if</span> (uDirEntry != 1)</div>
|
||||
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  {</div>
|
||||
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>())</div>
|
||||
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  << <span class="stringliteral">"DeleteAccount iterator re-validation failed."</span>;</div>
|
||||
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</div>
|
||||
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  }</div>
|
||||
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  uDirEntry = 0;</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>  } <span class="keywordflow">while</span> (<a class="code" href="namespaceripple.html#a3a022ec9e19a1b18a0ac3bdf7328a877">dirNext</a>(</div>
|
||||
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>(), ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry));</div>
|
||||
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  }</div>
|
||||
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  </div>
|
||||
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="comment">// Transfer any XRP remaining after the fee is paid to the destination:</span></div>
|
||||
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  (*dst)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] = (*dst)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] + <a class="code" href="classripple_1_1Transactor.html#ae20c19d8ecec32cec52399081e76cc45">mSourceBalance</a>;</div>
|
||||
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  (*src)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] = (*src)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] - <a class="code" href="classripple_1_1Transactor.html#ae20c19d8ecec32cec52399081e76cc45">mSourceBalance</a>;</div>
|
||||
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#ae41c98e735027c912354391f518e228d">deliver</a>(<a class="code" href="classripple_1_1Transactor.html#ae20c19d8ecec32cec52399081e76cc45">mSourceBalance</a>);</div>
|
||||
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  </div>
|
||||
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  assert((*src)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] == <a class="code" href="classripple_1_1XRPAmount.html">XRPAmount</a>(0));</div>
|
||||
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  </div>
|
||||
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <span class="comment">// If there's still an owner directory associated with the source account</span></div>
|
||||
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="comment">// delete it.</span></div>
|
||||
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().exists(ownerDirKeylet) && !<a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().emptyDirDelete(ownerDirKeylet))</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>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>()) << <span class="stringliteral">"DeleteAccount cannot delete root dir node of "</span></div>
|
||||
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  << <a class="code" href="namespaceripple.html#a08a13b62b18272366f788632359e8793">toBase58</a>(<a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>);</div>
|
||||
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caa7460a5fac26c1d8abef55b8c1129150">tecHAS_OBLIGATIONS</a>;</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>  </div>
|
||||
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="comment">// Re-arm the password change fee if we can and need to.</span></div>
|
||||
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1Transactor.html#ae20c19d8ecec32cec52399081e76cc45">mSourceBalance</a> > <a class="code" href="classripple_1_1XRPAmount.html">XRPAmount</a>(0) && dst->isFlag(<a class="code" href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a3023711a4bd27dad27a57290b0df1087">lsfPasswordSpent</a>))</div>
|
||||
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  dst->clearFlag(<a class="code" href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a3023711a4bd27dad27a57290b0df1087">lsfPasswordSpent</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>  <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#a542437b9b59a623e755979acdc075af5">update</a>(dst);</div>
|
||||
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#afda9c12acbda605becf20f54d45587d4">erase</a>(src);</div>
|
||||
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  </div>
|
||||
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>;</div>
|
||||
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span> }</div>
|
||||
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  </div>
|
||||
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span> } <span class="comment">// namespace ripple</span></div>
|
||||
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().exists(ownerDirKeylet) &&</div>
|
||||
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <a class="code" href="namespaceripple.html#a34251c908a52d50d055160c19d6e6e56">dirFirst</a>(<a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>(), ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry))</div>
|
||||
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  {</div>
|
||||
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keywordflow">do</span></div>
|
||||
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  {</div>
|
||||
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="comment">// Choose the right way to delete each directory node.</span></div>
|
||||
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keyword">auto</span> sleItem = <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#aad9fb1233dec10dcc10c2e3b1da6a723">peek</a>(<a class="code" href="namespaceripple_1_1keylet.html#a1fc176ed1b328b0ef5392b5b5468e269">keylet::child</a>(dirEntry));</div>
|
||||
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="keywordflow">if</span> (!sleItem)</div>
|
||||
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  {</div>
|
||||
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="comment">// Directory node has an invalid index. Bail out.</span></div>
|
||||
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>())</div>
|
||||
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  << <span class="stringliteral">"DeleteAccount: Directory node in ledger "</span></div>
|
||||
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  << <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ReadView.html#ac284afc905c482953c35c61b459fd85b">seq</a>() << <span class="stringliteral">" has index to object that is missing: "</span></div>
|
||||
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  << <a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(dirEntry);</div>
|
||||
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</div>
|
||||
<div class="line"><a name="l00316"></a><span class="lineno"> 316</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>  <a class="code" href="namespaceripple.html#ac151bf19e1f4daae2b04c65c65117139">LedgerEntryType</a> <span class="keyword">const</span> nodeType{safe_cast<LedgerEntryType>(</div>
|
||||
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  sleItem->getFieldU16(<a class="code" href="namespaceripple.html#a95e082491139cffc65c01b6fcaa3edfe">sfLedgerEntryType</a>))};</div>
|
||||
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  </div>
|
||||
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  <span class="keywordflow">if</span> (<span class="keyword">auto</span> deleter = nonObligationDeleter(nodeType))</div>
|
||||
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  {</div>
|
||||
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <a class="code" href="classripple_1_1TERSubset.html">TER</a> <span class="keyword">const</span> result{</div>
|
||||
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  deleter(<a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#a6ec1f10e560afe30ed435c3f7eea715d">app</a>, <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>(), <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>, dirEntry, sleItem, <a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>)};</div>
|
||||
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  </div>
|
||||
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">if</span> (!<a class="code" href="namespaceripple.html#a5b31f337f444082f547ef1838e7064fc">isTesSuccess</a>(result))</div>
|
||||
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  }</div>
|
||||
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  {</div>
|
||||
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  assert(!<span class="stringliteral">"Undeletable entry should be found in preclaim."</span>);</div>
|
||||
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>())</div>
|
||||
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  << <span class="stringliteral">"DeleteAccount undeletable item not found in preclaim."</span>;</div>
|
||||
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caa7460a5fac26c1d8abef55b8c1129150">tecHAS_OBLIGATIONS</a>;</div>
|
||||
<div class="line"><a name="l00335"></a><span class="lineno"> 335</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>  <span class="comment">// dirFirst() and dirNext() are like iterators with exposed</span></div>
|
||||
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="comment">// internal state. We'll take advantage of that exposed state</span></div>
|
||||
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="comment">// to solve a common C++ problem: iterator invalidation while</span></div>
|
||||
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  <span class="comment">// deleting elements from a container.</span></div>
|
||||
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="comment">// We have just deleted one directory entry, which means our</span></div>
|
||||
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="comment">// "iterator state" is invalid.</span></div>
|
||||
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <span class="comment">// 1. During the process of getting an entry from the</span></div>
|
||||
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <span class="comment">// directory uDirEntry was incremented from 0 to 1.</span></div>
|
||||
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="comment">// 2. We then deleted the entry at index 0, which means the</span></div>
|
||||
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="comment">// entry that was at 1 has now moved to 0.</span></div>
|
||||
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="comment">// 3. So we verify that uDirEntry is indeed 1. Then we jam it</span></div>
|
||||
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <span class="comment">// back to zero to "un-invalidate" the iterator.</span></div>
|
||||
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  assert(uDirEntry == 1);</div>
|
||||
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <span class="keywordflow">if</span> (uDirEntry != 1)</div>
|
||||
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  {</div>
|
||||
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>())</div>
|
||||
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  << <span class="stringliteral">"DeleteAccount iterator re-validation failed."</span>;</div>
|
||||
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</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>  uDirEntry = 0;</div>
|
||||
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  </div>
|
||||
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  } <span class="keywordflow">while</span> (<a class="code" href="namespaceripple.html#a3a022ec9e19a1b18a0ac3bdf7328a877">dirNext</a>(</div>
|
||||
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>(), ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry));</div>
|
||||
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  }</div>
|
||||
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  </div>
|
||||
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  <span class="comment">// Transfer any XRP remaining after the fee is paid to the destination:</span></div>
|
||||
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  (*dst)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] = (*dst)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] + <a class="code" href="classripple_1_1Transactor.html#ae20c19d8ecec32cec52399081e76cc45">mSourceBalance</a>;</div>
|
||||
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  (*src)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] = (*src)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] - <a class="code" href="classripple_1_1Transactor.html#ae20c19d8ecec32cec52399081e76cc45">mSourceBalance</a>;</div>
|
||||
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#ae41c98e735027c912354391f518e228d">deliver</a>(<a class="code" href="classripple_1_1Transactor.html#ae20c19d8ecec32cec52399081e76cc45">mSourceBalance</a>);</div>
|
||||
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  </div>
|
||||
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  assert((*src)[<a class="code" href="namespaceripple.html#ab8a9c54401e8209fca7396c6b9c610f4">sfBalance</a>] == <a class="code" href="classripple_1_1XRPAmount.html">XRPAmount</a>(0));</div>
|
||||
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  </div>
|
||||
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <span class="comment">// If there's still an owner directory associated with the source account</span></div>
|
||||
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="comment">// delete it.</span></div>
|
||||
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().exists(ownerDirKeylet) && !<a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().emptyDirDelete(ownerDirKeylet))</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>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>()) << <span class="stringliteral">"DeleteAccount cannot delete root dir node of "</span></div>
|
||||
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  << <a class="code" href="namespaceripple.html#a08a13b62b18272366f788632359e8793">toBase58</a>(<a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>);</div>
|
||||
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caa7460a5fac26c1d8abef55b8c1129150">tecHAS_OBLIGATIONS</a>;</div>
|
||||
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  }</div>
|
||||
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  </div>
|
||||
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  <span class="comment">// Re-arm the password change fee if we can and need to.</span></div>
|
||||
<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1Transactor.html#ae20c19d8ecec32cec52399081e76cc45">mSourceBalance</a> > <a class="code" href="classripple_1_1XRPAmount.html">XRPAmount</a>(0) && dst->isFlag(<a class="code" href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a3023711a4bd27dad27a57290b0df1087">lsfPasswordSpent</a>))</div>
|
||||
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  dst->clearFlag(<a class="code" href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a3023711a4bd27dad27a57290b0df1087">lsfPasswordSpent</a>);</div>
|
||||
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  </div>
|
||||
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#a542437b9b59a623e755979acdc075af5">update</a>(dst);</div>
|
||||
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  <a class="code" href="classripple_1_1Transactor.html#a1ac5d16d7b21e8af9cc94d7af39a85d5">view</a>().<a class="code" href="classripple_1_1ApplyView.html#afda9c12acbda605becf20f54d45587d4">erase</a>(src);</div>
|
||||
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  </div>
|
||||
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>;</div>
|
||||
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span> }</div>
|
||||
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  </div>
|
||||
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span> } <span class="comment">// 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="anamespaceripple_1_1keylet_html_aa9b2ba2df3c3da4cecd1c07cccf7c7f9"><div class="ttname"><a href="namespaceripple_1_1keylet.html#aa9b2ba2df3c3da4cecd1c07cccf7c7f9">ripple::keylet::ownerDir</a></div><div class="ttdeci">Keylet ownerDir(AccountID const &id) noexcept</div><div class="ttdoc">The root page of an account's directory.</div><div class="ttdef"><b>Definition:</b> <a href="Indexes_8cpp_source.html#l00303">Indexes.cpp:303</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1Application_html"><div class="ttname"><a href="classripple_1_1Application.html">ripple::Application</a></div><div class="ttdef"><b>Definition:</b> <a href="Application_8h_source.html#l00115">Application.h:115</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a9c4dd9876685de738163e6ddb7ae498f"><div class="ttname"><a href="namespaceripple.html#a9c4dd9876685de738163e6ddb7ae498f">ripple::cdirNext</a></div><div class="ttdeci">bool cdirNext(ReadView const &view, uint256 const &root, std::shared_ptr< SLE const > &page, unsigned int &index, uint256 &entry)</div><div class="ttdoc">Returns the next entry in the directory, advancing the index.</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l00145">View.cpp:145</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a7ed79af90f5252a74ae12db6aebc1d89"><div class="ttname"><a href="namespaceripple.html#a7ed79af90f5252a74ae12db6aebc1d89">ripple::sfFirstNFTokenSequence</a></div><div class="ttdeci">const SF_UINT32 sfFirstNFTokenSequence</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a3a022ec9e19a1b18a0ac3bdf7328a877"><div class="ttname"><a href="namespaceripple.html#a3a022ec9e19a1b18a0ac3bdf7328a877">ripple::dirNext</a></div><div class="ttdeci">bool dirNext(ApplyView &view, uint256 const &root, std::shared_ptr< SLE > &page, unsigned int &index, uint256 &entry)</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l00123">View.cpp:123</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a8b257ff89d14ac75ce240946f32d3773"><div class="ttname"><a href="namespaceripple.html#a8b257ff89d14ac75ce240946f32d3773">ripple::preflight2</a></div><div class="ttdeci">NotTEC preflight2(PreflightContext const &ctx)</div><div class="ttdoc">Checks whether the signature appears valid.</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8cpp_source.html#l00109">Transactor.cpp:109</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_ac151bf19e1f4daae2b04c65c65117139aa28c736ec52242ffe39aaa030db1accd"><div class="ttname"><a href="namespaceripple.html#ac151bf19e1f4daae2b04c65c65117139aa28c736ec52242ffe39aaa030db1accd">ripple::ltTICKET</a></div><div class="ttdeci">@ ltTICKET</div><div class="ttdoc">A ledger object which describes a ticket.</div><div class="ttdef"><b>Definition:</b> <a href="LedgerFormats_8h_source.html#l00080">LedgerFormats.h:80</a></div></div>
|
||||
@@ -473,7 +491,7 @@ $(function() {
|
||||
<div class="ttc" id="aclassripple_1_1DeleteAccount_html_a4e87a74787a3fb4df42704e499667090"><div class="ttname"><a href="classripple_1_1DeleteAccount.html#a4e87a74787a3fb4df42704e499667090">ripple::DeleteAccount::preflight</a></div><div class="ttdeci">static NotTEC preflight(PreflightContext const &ctx)</div><div class="ttdef"><b>Definition:</b> <a href="DeleteAccount_8cpp_source.html#l00037">DeleteAccount.cpp:37</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1keylet_html_a1fc176ed1b328b0ef5392b5b5468e269"><div class="ttname"><a href="namespaceripple_1_1keylet.html#a1fc176ed1b328b0ef5392b5b5468e269">ripple::keylet::child</a></div><div class="ttdeci">Keylet child(uint256 const &key) noexcept</div><div class="ttdoc">Any item that can be in an owner dir.</div><div class="ttdef"><b>Definition:</b> <a href="Indexes_8cpp_source.html#l00139">Indexes.cpp:139</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ApplyView_html_a542437b9b59a623e755979acdc075af5"><div class="ttname"><a href="classripple_1_1ApplyView.html#a542437b9b59a623e755979acdc075af5">ripple::ApplyView::update</a></div><div class="ttdeci">virtual void update(std::shared_ptr< SLE > const &sle)=0</div><div class="ttdoc">Indicate changes to a peeked SLE.</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1DeleteAccount_html_a8d6dbc29edb43295ca2fa2e2215e7ba2"><div class="ttname"><a href="classripple_1_1DeleteAccount.html#a8d6dbc29edb43295ca2fa2e2215e7ba2">ripple::DeleteAccount::doApply</a></div><div class="ttdeci">TER doApply() override</div><div class="ttdef"><b>Definition:</b> <a href="DeleteAccount_8cpp_source.html#l00267">DeleteAccount.cpp:267</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1DeleteAccount_html_a8d6dbc29edb43295ca2fa2e2215e7ba2"><div class="ttname"><a href="classripple_1_1DeleteAccount.html#a8d6dbc29edb43295ca2fa2e2215e7ba2">ripple::DeleteAccount::doApply</a></div><div class="ttdeci">TER doApply() override</div><div class="ttdef"><b>Definition:</b> <a href="DeleteAccount_8cpp_source.html#l00284">DeleteAccount.cpp:284</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html_a01292d27c77c6749280c5ddfdf2b0189"><div class="ttname"><a href="classripple_1_1base__uint.html#a01292d27c77c6749280c5ddfdf2b0189">ripple::base_uint::next</a></div><div class="ttdeci">base_uint next() const</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00448">base_uint.h:448</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1DeleteAccount_html_a8bf4805e965073d0607d828883386aab"><div class="ttname"><a href="classripple_1_1DeleteAccount.html#a8bf4805e965073d0607d828883386aab">ripple::DeleteAccount::preclaim</a></div><div class="ttdeci">static TER preclaim(PreclaimContext const &ctx)</div><div class="ttdef"><b>Definition:</b> <a href="DeleteAccount_8cpp_source.html#l00162">DeleteAccount.cpp:162</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_afe21c8454670d46fb93751a5edffed46acf9cc7bb9b19628c6a89a21611972242"><div class="ttname"><a href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46acf9cc7bb9b19628c6a89a21611972242">ripple::temDST_IS_SRC</a></div><div class="ttdeci">@ temDST_IS_SRC</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00103">TER.h:103</a></div></div>
|
||||
@@ -482,6 +500,7 @@ $(function() {
|
||||
<div class="ttc" id="anamespaceripple_html_a4a9c7b33fef9015d6406302ef80b63c5a873a48eb9d8f66315874a318df664f05"><div class="ttname"><a href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a873a48eb9d8f66315874a318df664f05">ripple::lsfDepositAuth</a></div><div class="ttdeci">@ lsfDepositAuth</div><div class="ttdef"><b>Definition:</b> <a href="LedgerFormats_8h_source.html#l00234">LedgerFormats.h:234</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ApplyView_html"><div class="ttname"><a href="classripple_1_1ApplyView.html">ripple::ApplyView</a></div><div class="ttdoc">Writeable view to a ledger, for applying a transaction.</div><div class="ttdef"><b>Definition:</b> <a href="ApplyView_8h_source.html#l00134">ApplyView.h:134</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1ApplyContext_html_a6ec1f10e560afe30ed435c3f7eea715d"><div class="ttname"><a href="classripple_1_1ApplyContext.html#a6ec1f10e560afe30ed435c3f7eea715d">ripple::ApplyContext::app</a></div><div class="ttdeci">Application & app</div><div class="ttdef"><b>Definition:</b> <a href="ApplyContext_8h_source.html#l00047">ApplyContext.h:47</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a2abe44fcd04710b216e3f9f774e4849d"><div class="ttname"><a href="namespaceripple.html#a2abe44fcd04710b216e3f9f774e4849d">ripple::fixNFTokenRemint</a></div><div class="ttdeci">const uint256 fixNFTokenRemint</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a356c68147333a9a48a344718038576d9"><div class="ttname"><a href="namespaceripple.html#a356c68147333a9a48a344718038576d9">ripple::uint256</a></div><div class="ttdeci">base_uint< 256 > uint256</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00550">base_uint.h:550</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a19e46a085c26216e75132e85139d09ea"><div class="ttname"><a href="namespaceripple.html#a19e46a085c26216e75132e85139d09ea">ripple::featureDeletableAccounts</a></div><div class="ttdeci">const uint256 featureDeletableAccounts</div></div>
|
||||
<div class="ttc" id="astructripple_1_1Fees_html_a6d48ec23cfbe4eacac46fbfaa8ce67f9"><div class="ttname"><a href="structripple_1_1Fees.html#a6d48ec23cfbe4eacac46fbfaa8ce67f9">ripple::Fees::increment</a></div><div class="ttdeci">XRPAmount increment</div><div class="ttdef"><b>Definition:</b> <a href="ReadView_8h_source.html#l00053">ReadView.h:53</a></div></div>
|
||||
|
||||
Reference in New Issue
Block a user