mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
727 lines
150 KiB
HTML
727 lines
150 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>rippled: CashCheck.cpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">rippled
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_df9c78dcf3f59a33b12284f95992a64b.html">ripple</a></li><li class="navelem"><a class="el" href="dir_9f69212e4c6e2ca9ec5ab59cd7b6275c.html">app</a></li><li class="navelem"><a class="el" href="dir_08bd996c7140e5d4c4a2548bd66a393f.html">tx</a></li><li class="navelem"><a class="el" href="dir_03680b44059da148632e530fc6dc63c7.html">impl</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">CashCheck.cpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//------------------------------------------------------------------------------</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> This file is part of rippled: https://github.com/ripple/rippled</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Copyright (c) 2017 Ripple Labs Inc.</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> Permission to use, copy, modify, and/or distribute this software for any</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> purpose with or without fee is hereby granted, provided that the above</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> copyright notice and this permission notice appear in all copies.</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">//==============================================================================</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  </div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <ripple/app/ledger/Ledger.h></span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <ripple/app/paths/Flow.h></span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <ripple/app/tx/impl/CashCheck.h></span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <ripple/basics/Log.h></span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <ripple/basics/scope.h></span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <ripple/protocol/Feature.h></span></div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <ripple/protocol/Indexes.h></span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <ripple/protocol/STAccount.h></span></div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <ripple/protocol/TER.h></span></div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <ripple/protocol/TxFlags.h></span></div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/algorithm.html">algorithm</a>></span></div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  </div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <a class="code" href="namespaceripple.html#af99ba2263d2a1e29207c40a35fc9f6b3">NotTEC</a></div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classripple_1_1CashCheck.html#af9c0cf35c7a36a4eadb2c25e73bd394a"> 36</a></span> <a class="code" href="classripple_1_1CashCheck.html#af9c0cf35c7a36a4eadb2c25e73bd394a">CashCheck::preflight</a>(<a class="code" href="structripple_1_1PreflightContext.html">PreflightContext</a> <span class="keyword">const</span>& ctx)</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> {</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keywordflow">if</span> (!ctx.<a class="code" href="structripple_1_1PreflightContext.html#af305cba8e0b5dd06e61d2dc6ac74c1a8">rules</a>.<a class="code" href="classripple_1_1Rules.html#a1a8388a2b9588aa9446ece92a88e0dd2">enabled</a>(<a class="code" href="namespaceripple.html#a5f719e22f7b14728584f07b665dfd7cc">featureChecks</a>))</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46ac3482079467d517ea82aa9c8fa693d21">temDISABLED</a>;</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  </div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <a class="code" href="classripple_1_1TERSubset.html">NotTEC</a> <span class="keyword">const</span> ret{<a class="code" href="namespaceripple.html#a5dfb437ade69624474bbe4125ceb791a">preflight1</a>(ctx)};</div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">if</span> (!<a class="code" href="namespaceripple.html#a5b31f337f444082f547ef1838e7064fc">isTesSuccess</a>(ret))</div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordflow">return</span> ret;</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">if</span> (ctx.<a class="code" href="structripple_1_1PreflightContext.html#af202c00e509cfbb1df4fe69f4d6d6560">tx</a>.<a class="code" href="classripple_1_1STObject.html#af5aa57043ec772da30341e3c3b823d7f">getFlags</a>() & <a class="code" href="namespaceripple.html#ac8844b7ad1603892172e8e6d1044de00">tfUniversalMask</a>)</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  {</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="comment">// There are no flags (other than universal) for CashCheck yet.</span></div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreflightContext.html#a7db9100a0f215cba1c093674692601c4">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Malformed transaction: Invalid flags set."</span>;</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46aa4754e0f122658747650b3b1c0a846a8">temINVALID_FLAG</a>;</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  }</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  </div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="comment">// Exactly one of Amount or DeliverMin must be present.</span></div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keyword">auto</span> <span class="keyword">const</span> optAmount = ctx.<a class="code" href="structripple_1_1PreflightContext.html#af202c00e509cfbb1df4fe69f4d6d6560">tx</a>[~<a class="code" href="namespaceripple.html#a29758397ce451beaa436c3a9dfc83030">sfAmount</a>];</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keyword">auto</span> <span class="keyword">const</span> optDeliverMin = ctx.<a class="code" href="structripple_1_1PreflightContext.html#af202c00e509cfbb1df4fe69f4d6d6560">tx</a>[~<a class="code" href="namespaceripple.html#a2695cfe5d7b5e17b9a0ed4ec86244ec5">sfDeliverMin</a>];</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  </div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordflow">if</span> (<span class="keyword">static_cast<</span><span class="keywordtype">bool</span><span class="keyword">></span>(optAmount) == <span class="keyword">static_cast<</span><span class="keywordtype">bool</span><span class="keyword">></span>(optDeliverMin))</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  {</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreflightContext.html#a7db9100a0f215cba1c093674692601c4">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  << <span class="stringliteral">"Malformed transaction: "</span></div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="stringliteral">"does not specify exactly one of Amount and DeliverMin."</span>;</div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46a6c750a245b6efb84fdc4ab34dc010328">temMALFORMED</a>;</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  }</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  </div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="comment">// Make sure the amount is valid.</span></div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> <span class="keyword">const</span> value{optAmount ? *optAmount : *optDeliverMin};</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">if</span> (!<a class="code" href="namespaceripple.html#a3e312ecdb199409dca142d307a3e0e5b">isLegalNet</a>(value) || value.signum() <= 0)</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  {</div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreflightContext.html#a7db9100a0f215cba1c093674692601c4">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Malformed transaction: bad amount: "</span></div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  << value.getFullText();</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46a07dedb576e47ed9570e5acc5b4b1d3ea">temBAD_AMOUNT</a>;</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  </div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceripple.html#a0d78fe5b5eff36774b5be525cbcc3972">badCurrency</a>() == value.getCurrency())</div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  {</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreflightContext.html#a7db9100a0f215cba1c093674692601c4">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Malformed transaction: Bad currency."</span>;</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46a47ebc45c5ddd8a242d47c055bec0de63">temBAD_CURRENCY</a>;</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  }</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  </div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a8b257ff89d14ac75ce240946f32d3773">preflight2</a>(ctx);</div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> }</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  </div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <a class="code" href="classripple_1_1TERSubset.html">TER</a></div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classripple_1_1CashCheck.html#a1b26e1e01488d2a3d05fbd6b671d2063"> 83</a></span> <a class="code" href="classripple_1_1CashCheck.html#a1b26e1e01488d2a3d05fbd6b671d2063">CashCheck::preclaim</a>(<a class="code" href="structripple_1_1PreclaimContext.html">PreclaimContext</a> <span class="keyword">const</span>& ctx)</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> {</div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keyword">auto</span> <span class="keyword">const</span> sleCheck = 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#a66624dcb8f66cb8548d032ff97030aa4">keylet::check</a>(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a8e1240b39791cf309b9caaffe8e5d306">tx</a>[<a class="code" href="namespaceripple.html#aa39e5a249ee8c9642a47e1e9a9078f40">sfCheckID</a>]));</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">if</span> (!sleCheck)</div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  {</div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Check does not exist."</span>;</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca02ea20c787300a40fe375ba3d6405258">tecNO_ENTRY</a>;</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  }</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  </div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// Only cash a check with this account as the destination.</span></div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="classripple_1_1base__uint.html">AccountID</a> <span class="keyword">const</span> dstId = sleCheck->at(<a class="code" href="namespaceripple.html#a15aa3b3032d0908932dc5abf4b1ef862">sfDestination</a>);</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordflow">if</span> (ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a8e1240b39791cf309b9caaffe8e5d306">tx</a>[<a class="code" href="namespaceripple.html#a5bab99595719d22579e10d21cf048eb0">sfAccount</a>] != dstId)</div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  {</div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Cashing a check with wrong Destination."</span>;</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca9af7057961bc54674f4a6c2dd8ed6ab9">tecNO_PERMISSION</a>;</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="code" href="classripple_1_1base__uint.html">AccountID</a> <span class="keyword">const</span> srcId = sleCheck->at(<a class="code" href="namespaceripple.html#a5bab99595719d22579e10d21cf048eb0">sfAccount</a>);</div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordflow">if</span> (srcId == dstId)</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  {</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="comment">// They wrote a check to themselves. This should be caught when</span></div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="comment">// the check is created, but better late than never.</span></div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">error</a>()) << <span class="stringliteral">"Malformed transaction: Cashing check to self."</span>;</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca93e4e159f8759ea0948423c699e7cf77">tecINTERNAL</a>;</div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  {</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keyword">auto</span> <span class="keyword">const</span> sleSrc = 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#a50c370db96b4fdcdd202d9c2c38afce9">keylet::account</a>(srcId));</div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keyword">auto</span> <span class="keyword">const</span> sleDst = 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#a50c370db96b4fdcdd202d9c2c38afce9">keylet::account</a>(dstId));</div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">if</span> (!sleSrc || !sleDst)</div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  {</div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="comment">// If the check exists this should never occur.</span></div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  << <span class="stringliteral">"Malformed transaction: source or destination not in ledger"</span>;</div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca02ea20c787300a40fe375ba3d6405258">tecNO_ENTRY</a>;</div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  }</div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  </div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">if</span> ((sleDst->getFlags() & <a class="code" href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a2243e81f83c4191286c8c46bdd86d6f3">lsfRequireDestTag</a>) &&</div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  !sleCheck->isFieldPresent(<a class="code" href="namespaceripple.html#a999804f69d4c945a231d41eadabec2b8">sfDestinationTag</a>))</div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  {</div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="comment">// The tag is basically account-specific information we don't</span></div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="comment">// understand, but we can require someone to fill it in.</span></div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  << <span class="stringliteral">"Malformed transaction: DestinationTag required in check."</span>;</div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caa3ac7c997274040539a497cadc280b22">tecDST_TAG_NEEDED</a>;</div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  }</div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  </div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceripple.html#ad574e2b04fc8231900df14881418af18">hasExpired</a>(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>, sleCheck->at(~<a class="code" href="namespaceripple.html#ae3182ff3db5f7f67e4fe8bcd69316727">sfExpiration</a>)))</div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  {</div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Cashing a check that has already expired."</span>;</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caede598f88bbd44e4df1c4e0d418c4cdc">tecEXPIRED</a>;</div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  }</div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  </div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  {</div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="comment">// Preflight verified exactly one of Amount or DeliverMin is present.</span></div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="comment">// Make sure the requested amount is reasonable.</span></div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> <span class="keyword">const</span> value{[](<a class="code" href="classripple_1_1STTx.html">STTx</a> <span class="keyword">const</span>& tx) {</div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keyword">auto</span> <span class="keyword">const</span> optAmount = tx[~<a class="code" href="namespaceripple.html#a29758397ce451beaa436c3a9dfc83030">sfAmount</a>];</div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">return</span> optAmount ? *optAmount : tx[<a class="code" href="namespaceripple.html#a2695cfe5d7b5e17b9a0ed4ec86244ec5">sfDeliverMin</a>];</div>
|
|
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  }(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a8e1240b39791cf309b9caaffe8e5d306">tx</a>)};</div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  </div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> <span class="keyword">const</span> sendMax = sleCheck->at(<a class="code" href="namespaceripple.html#aa693ff83cdfe0f5cb821db0000b22928">sfSendMax</a>);</div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <a class="code" href="classripple_1_1base__uint.html">Currency</a> <span class="keyword">const</span> currency{value.getCurrency()};</div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">if</span> (currency != sendMax.<a class="code" href="classripple_1_1STAmount.html#a5c7b5375e72e2459d4b6d65797744ca6">getCurrency</a>())</div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  {</div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Check cash does not match check currency."</span>;</div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46a6c750a245b6efb84fdc4ab34dc010328">temMALFORMED</a>;</div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <a class="code" href="classripple_1_1base__uint.html">AccountID</a> <span class="keyword">const</span> issuerId{value.getIssuer()};</div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordflow">if</span> (issuerId != sendMax.<a class="code" href="classripple_1_1STAmount.html#aaac822e5948df5f12b6eaf48feaf1684">getIssuer</a>())</div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  {</div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Check cash does not match check issuer."</span>;</div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46a6c750a245b6efb84fdc4ab34dc010328">temMALFORMED</a>;</div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  }</div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordflow">if</span> (value > sendMax)</div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  {</div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Check cashed for more than check sendMax."</span>;</div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38cabd7038b5669becf7271665614c94efb6">tecPATH_PARTIAL</a>;</div>
|
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  }</div>
|
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  </div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="comment">// Make sure the check owner holds at least value. If they have</span></div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="comment">// less than value the check cannot be cashed.</span></div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  {</div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> availableFunds{<a class="code" href="namespaceripple.html#a15bb971c7e554fc3df218aba54c33fcc">accountFunds</a>(</div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>,</div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  sleCheck->at(<a class="code" href="namespaceripple.html#a5bab99595719d22579e10d21cf048eb0">sfAccount</a>),</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  value,</div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <a class="code" href="namespaceripple.html#a17a9a9b903b66e49f5413d82ce79f085a852cabbbe21a9b4d63aff777eceab2fd">fhZERO_IF_FROZEN</a>,</div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>)};</div>
|
|
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  </div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="comment">// Note that src will have one reserve's worth of additional XRP</span></div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="comment">// once the check is cashed, since the check's reserve will no</span></div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="comment">// longer be required. So, if we're dealing in XRP, we add one</span></div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="comment">// reserve's worth to the available funds.</span></div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keywordflow">if</span> (value.native())</div>
|
|
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  availableFunds += <a class="code" href="classripple_1_1XRPAmount.html">XRPAmount</a>{ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>.<a class="code" href="classripple_1_1ReadView.html#a9bbdb3fb4754482a8d6c6e6d25c2d1eb">fees</a>().<a class="code" href="structripple_1_1Fees.html#a6d48ec23cfbe4eacac46fbfaa8ce67f9">increment</a>};</div>
|
|
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  </div>
|
|
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">if</span> (value > availableFunds)</div>
|
|
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  {</div>
|
|
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  << <span class="stringliteral">"Check cashed for more than owner's balance."</span>;</div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38cabd7038b5669becf7271665614c94efb6">tecPATH_PARTIAL</a>;</div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  }</div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  }</div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  </div>
|
|
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="comment">// An issuer can always accept their own currency.</span></div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordflow">if</span> (!value.native() && (value.getIssuer() != dstId))</div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  {</div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keyword">auto</span> <span class="keyword">const</span> sleTrustLine =</div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  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#ad7913ec52c58534ee1601ab21956123f">keylet::line</a>(dstId, issuerId, currency));</div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  </div>
|
|
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="keywordflow">if</span> (!sleTrustLine &&</div>
|
|
<div class="line"><a name="l00194"></a><span class="lineno"> 194</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#adba2cb9b84145dcb4b81daa3249d7d5b">featureCheckCashMakesTrustLine</a>))</div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  {</div>
|
|
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
|
|
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  << <span class="stringliteral">"Cannot cash check for IOU without trustline."</span>;</div>
|
|
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38cac480d742e7760c48047bb3ccc50a40ef">tecNO_LINE</a>;</div>
|
|
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  }</div>
|
|
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  </div>
|
|
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keyword">auto</span> <span class="keyword">const</span> sleIssuer = 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#a50c370db96b4fdcdd202d9c2c38afce9">keylet::account</a>(issuerId));</div>
|
|
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordflow">if</span> (!sleIssuer)</div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  {</div>
|
|
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
|
|
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  << <span class="stringliteral">"Can't receive IOUs from non-existent issuer: "</span></div>
|
|
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  << <a class="code" href="namespaceripple.html#af9776f187d3686a7fba4c2d2fbeebdf4">to_string</a>(issuerId);</div>
|
|
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca33d363e51ee15c8bd4f5d7c4e4518def">tecNO_ISSUER</a>;</div>
|
|
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  }</div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  </div>
|
|
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordflow">if</span> (sleIssuer->at(<a class="code" href="namespaceripple.html#ac1371098a8a7c1e1238290d0220dc941">sfFlags</a>) & <a class="code" href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a44c3bc643086a0beb87e3aaeb544e6ad">lsfRequireAuth</a>)</div>
|
|
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  {</div>
|
|
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordflow">if</span> (!sleTrustLine)</div>
|
|
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  {</div>
|
|
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="comment">// We can only create a trust line if the issuer does not</span></div>
|
|
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="comment">// have requireAuth set.</span></div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caf5820ac855eaa9dfcd635cd411019a31">tecNO_AUTH</a>;</div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  }</div>
|
|
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  </div>
|
|
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="comment">// Entries have a canonical representation, determined by a</span></div>
|
|
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="comment">// lexicographical "greater than" comparison employing strict</span></div>
|
|
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="comment">// weak ordering. Determine which entry we need to access.</span></div>
|
|
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordtype">bool</span> <span class="keyword">const</span> canonical_gt(dstId > issuerId);</div>
|
|
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  </div>
|
|
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keywordtype">bool</span> <span class="keyword">const</span> is_authorized(</div>
|
|
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  sleTrustLine->at(<a class="code" href="namespaceripple.html#ac1371098a8a7c1e1238290d0220dc941">sfFlags</a>) &</div>
|
|
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  (canonical_gt ? <a class="code" href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5af37617abe9ad741cd823746961f1fb3a">lsfLowAuth</a> : <a class="code" href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5ae6db21adf463a223e362b44f0fd54663">lsfHighAuth</a>));</div>
|
|
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  </div>
|
|
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">if</span> (!is_authorized)</div>
|
|
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  {</div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  << <span class="stringliteral">"Can't receive IOUs from issuer without auth."</span>;</div>
|
|
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caf5820ac855eaa9dfcd635cd411019a31">tecNO_AUTH</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>  }</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">// The trustline from source to issuer does not need to</span></div>
|
|
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="comment">// be checked for freezing, since we already verified that the</span></div>
|
|
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="comment">// source has sufficient non-frozen funds available.</span></div>
|
|
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  </div>
|
|
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="comment">// However, the trustline from destination to issuer may not</span></div>
|
|
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="comment">// be frozen.</span></div>
|
|
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceripple.html#a6cb89b79bc073abda42953c323d36cda">isFrozen</a>(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">view</a>, dstId, currency, issuerId))</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>  JLOG(ctx.<a class="code" href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">j</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"Cashing a check to a frozen trustline."</span>;</div>
|
|
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca608da193a4a22ae1c78d76b6e843b7e6">tecFROZEN</a>;</div>
|
|
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  }</div>
|
|
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  }</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>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>;</div>
|
|
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span> }</div>
|
|
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  </div>
|
|
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <a class="code" href="classripple_1_1TERSubset.html">TER</a></div>
|
|
<div class="line"><a name="l00253"></a><span class="lineno"><a class="line" href="classripple_1_1CashCheck.html#a77617cbe4011c799e76bea864e96e193"> 253</a></span> <a class="code" href="classripple_1_1CashCheck.html#a77617cbe4011c799e76bea864e96e193">CashCheck::doApply</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">// Flow requires that we operate on a PaymentSandbox, rather than</span></div>
|
|
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="comment">// directly on a View.</span></div>
|
|
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <a class="code" href="classripple_1_1PaymentSandbox.html">PaymentSandbox</a> psb(&<a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#a77320121a8dc95fb701fe4fa477c1b3d">view</a>());</div>
|
|
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  </div>
|
|
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keyword">auto</span> sleCheck = psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#afe88196d7aec85f2af00d7cd0b1a28c3">peek</a>(<a class="code" href="namespaceripple_1_1keylet.html#a66624dcb8f66cb8548d032ff97030aa4">keylet::check</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#aa39e5a249ee8c9642a47e1e9a9078f40">sfCheckID</a>]));</div>
|
|
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keywordflow">if</span> (!sleCheck)</div>
|
|
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  {</div>
|
|
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>()) << <span class="stringliteral">"Precheck did not verify check's existence."</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#aa298e929e02f59c2b05a30ee8805b38caecd11145ac07375d1c0793e699932969">tecFAILED_PROCESSING</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_1base__uint.html">AccountID</a> <span class="keyword">const</span> srcId{sleCheck->getAccountID(<a class="code" href="namespaceripple.html#a5bab99595719d22579e10d21cf048eb0">sfAccount</a>)};</div>
|
|
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keywordflow">if</span> (!psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#ab5b90b656223e19272dfe10e2dcd7f56">exists</a>(<a class="code" href="namespaceripple_1_1keylet.html#a50c370db96b4fdcdd202d9c2c38afce9">keylet::account</a>(srcId)) ||</div>
|
|
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  !psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#ab5b90b656223e19272dfe10e2dcd7f56">exists</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="l00269"></a><span class="lineno"> 269</span>  {</div>
|
|
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#afdcc5c07be2cc8022632ed0050a024f1">journal</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>())</div>
|
|
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  << <span class="stringliteral">"Precheck did not verify source or destination's existence."</span>;</div>
|
|
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caecd11145ac07375d1c0793e699932969">tecFAILED_PROCESSING</a>;</div>
|
|
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  }</div>
|
|
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  </div>
|
|
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="comment">// Preclaim already checked that source has at least the requested</span></div>
|
|
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <span class="comment">// funds.</span></div>
|
|
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="comment">// Therefore, if this is a check written to self, (and it shouldn't be)</span></div>
|
|
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="comment">// we know they have sufficient funds to pay the check. Since they are</span></div>
|
|
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="comment">// taking the funds from their own pocket and putting it back in their</span></div>
|
|
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="comment">// pocket no balance will change.</span></div>
|
|
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="comment">// If it is not a check to self (as should be the case), then there's</span></div>
|
|
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="comment">// work to do...</span></div>
|
|
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keyword">auto</span> viewJ = <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_1Application.html#a2897c28a5b5040e80e66f676d201d03f">journal</a>(<span class="stringliteral">"View"</span>);</div>
|
|
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keyword">auto</span> <span class="keyword">const</span> optDeliverMin = <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#a2695cfe5d7b5e17b9a0ed4ec86244ec5">sfDeliverMin</a>];</div>
|
|
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="keywordtype">bool</span> <span class="keyword">const</span> doFix1623{psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#af16244cf2efd903b4575a0b85c94d159">rules</a>().<a class="code" href="classripple_1_1Rules.html#a1a8388a2b9588aa9446ece92a88e0dd2">enabled</a>(<a class="code" href="namespaceripple.html#af2c25b95b708d565d681958fbd20d2b6">fix1623</a>)};</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="keywordflow">if</span> (srcId != <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>)</div>
|
|
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  {</div>
|
|
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> <span class="keyword">const</span> sendMax = sleCheck->at(<a class="code" href="namespaceripple.html#aa693ff83cdfe0f5cb821db0000b22928">sfSendMax</a>);</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">// Flow() doesn't do XRP to XRP transfers.</span></div>
|
|
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <span class="keywordflow">if</span> (sendMax.<a class="code" href="classripple_1_1STAmount.html#af3a02d7e9cd0b11509a90e0e6980bd64">native</a>())</div>
|
|
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  {</div>
|
|
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="comment">// Here we need to calculate the amount of XRP src can send.</span></div>
|
|
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <span class="comment">// The amount they have available is their balance minus their</span></div>
|
|
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="comment">// reserve.</span></div>
|
|
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <span class="comment">// Since (if we're successful) we're about to remove an entry</span></div>
|
|
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="comment">// from src's directory, we allow them to send that additional</span></div>
|
|
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="comment">// incremental reserve amount in the transfer. Hence the -1</span></div>
|
|
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <span class="comment">// argument.</span></div>
|
|
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> <span class="keyword">const</span> srcLiquid{<a class="code" href="namespaceripple.html#afc787da3584a7facdc3f19fc366f0b70">xrpLiquid</a>(psb, srcId, -1, viewJ)};</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">// Now, how much do they need in order to be successful?</span></div>
|
|
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> <span class="keyword">const</span> xrpDeliver{</div>
|
|
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  optDeliverMin</div>
|
|
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  ? <a class="codeRef" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(*optDeliverMin, <a class="codeRef" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(sendMax, srcLiquid))</div>
|
|
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  : <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="classripple_1_1STObject.html#a8e207109e646759f4927d90e4404893f">getFieldAmount</a>(<a class="code" href="namespaceripple.html#a29758397ce451beaa436c3a9dfc83030">sfAmount</a>)};</div>
|
|
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  </div>
|
|
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="keywordflow">if</span> (srcLiquid < xrpDeliver)</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>  <span class="comment">// Vote no. However the transaction might succeed if applied</span></div>
|
|
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <span class="comment">// in a different order.</span></div>
|
|
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#abbe082bd27ca0f1d1365af2824e4f85b">trace</a>()) << <span class="stringliteral">"Cash Check: Insufficient XRP: "</span></div>
|
|
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  << srcLiquid.getFullText() << <span class="stringliteral">" < "</span></div>
|
|
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  << xrpDeliver.getFullText();</div>
|
|
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38cad6e984aac9838459128d97b668ec1e4f">tecUNFUNDED_PAYMENT</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>  </div>
|
|
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">if</span> (optDeliverMin && doFix1623)</div>
|
|
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <span class="comment">// Set the DeliveredAmount metadata.</span></div>
|
|
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  <a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#ae41c98e735027c912354391f518e228d">deliver</a>(xrpDeliver);</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="comment">// The source account has enough XRP so make the ledger change.</span></div>
|
|
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1TERSubset.html">TER</a> <span class="keyword">const</span> ter{</div>
|
|
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  <a class="code" href="namespaceripple.html#a5ee3f52d4feaf2ad6775033fbae860da">transferXRP</a>(psb, srcId, <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>, xrpDeliver, viewJ)};</div>
|
|
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  ter != <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>)</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>  <span class="comment">// The transfer failed. Return the error code.</span></div>
|
|
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <span class="keywordflow">return</span> ter;</div>
|
|
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  }</div>
|
|
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  }</div>
|
|
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <span class="keywordflow">else</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">// Note that for DeliverMin we don't know exactly how much</span></div>
|
|
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="comment">// currency we want flow to deliver. We can't ask for the</span></div>
|
|
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="comment">// maximum possible currency because there might be a gateway</span></div>
|
|
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  <span class="comment">// transfer rate to account for. Since the transfer rate cannot</span></div>
|
|
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="comment">// exceed 200%, we use 1/2 maxValue as our limit.</span></div>
|
|
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> <span class="keyword">const</span> flowDeliver{</div>
|
|
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  optDeliverMin ? <a class="code" href="classripple_1_1STAmount.html">STAmount</a>(</div>
|
|
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  optDeliverMin->issue(),</div>
|
|
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <a class="code" href="classripple_1_1STAmount.html#af88c7b9a2ee49408f4fd17e1ee9f20df">STAmount::cMaxValue</a> / 2,</div>
|
|
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <a class="code" href="classripple_1_1STAmount.html#a84ebd351b1c12b5467b59c9cd4d1640f">STAmount::cMaxOffset</a>)</div>
|
|
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  : <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="classripple_1_1STObject.html#a8e207109e646759f4927d90e4404893f">getFieldAmount</a>(<a class="code" href="namespaceripple.html#a29758397ce451beaa436c3a9dfc83030">sfAmount</a>)};</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">// If a trust line does not exist yet create one.</span></div>
|
|
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <a class="code" href="classripple_1_1Issue.html">Issue</a> <span class="keyword">const</span>& trustLineIssue = flowDeliver.issue();</div>
|
|
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <a class="code" href="classripple_1_1base__uint.html">AccountID</a> <span class="keyword">const</span> issuer = flowDeliver.getIssuer();</div>
|
|
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <a class="code" href="classripple_1_1base__uint.html">AccountID</a> <span class="keyword">const</span> truster = issuer == <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a> ? srcId : <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>;</div>
|
|
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <a class="code" href="structripple_1_1Keylet.html">Keylet</a> <span class="keyword">const</span> trustLineKey = <a class="code" href="namespaceripple_1_1keylet.html#ad7913ec52c58534ee1601ab21956123f">keylet::line</a>(truster, trustLineIssue);</div>
|
|
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <span class="keywordtype">bool</span> <span class="keyword">const</span> destLow = issuer > <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>;</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="keywordtype">bool</span> <span class="keyword">const</span> checkCashMakesTrustLine =</div>
|
|
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#af16244cf2efd903b4575a0b85c94d159">rules</a>().<a class="code" href="classripple_1_1Rules.html#a1a8388a2b9588aa9446ece92a88e0dd2">enabled</a>(<a class="code" href="namespaceripple.html#adba2cb9b84145dcb4b81daa3249d7d5b">featureCheckCashMakesTrustLine</a>);</div>
|
|
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  </div>
|
|
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keywordflow">if</span> (checkCashMakesTrustLine && !psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#ab5b90b656223e19272dfe10e2dcd7f56">exists</a>(trustLineKey))</div>
|
|
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  {</div>
|
|
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="comment">// 1. Can the check casher meet the reserve for the trust line?</span></div>
|
|
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="comment">// 2. Create trust line between destination (this) account</span></div>
|
|
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="comment">// and the issuer.</span></div>
|
|
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  <span class="comment">// 3. Apply correct noRipple settings on trust line. Use...</span></div>
|
|
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="comment">// a. this (destination) account and</span></div>
|
|
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  <span class="comment">// b. issuing account (not sending account).</span></div>
|
|
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  </div>
|
|
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="keyword">auto</span> <span class="keyword">const</span> sleDst = psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#afe88196d7aec85f2af00d7cd0b1a28c3">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="l00369"></a><span class="lineno"> 369</span>  </div>
|
|
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="comment">// Can the account cover the trust line's reserve?</span></div>
|
|
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <span class="keywordflow">if</span> (<a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> <span class="keyword">const</span> ownerCount = {sleDst->at(<a class="code" href="namespaceripple.html#aee6c41ec9be20b8705502ae9290ef2b0">sfOwnerCount</a>)};</div>
|
|
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <a class="code" href="classripple_1_1Transactor.html#abb2f6f5d7fd8c663c5df76b6fcba2c49">mPriorBalance</a> < psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#a08bb2668a3260801e8f7d85b4242eb6c">fees</a>().accountReserve(ownerCount + 1))</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>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#abbe082bd27ca0f1d1365af2824e4f85b">trace</a>()) << <span class="stringliteral">"Trust line does not exist. "</span></div>
|
|
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="stringliteral">"Insufficent reserve to create line."</span>;</div>
|
|
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  </div>
|
|
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca16147ffb75207394488047fbd471dc9e">tecNO_LINE_INSUF_RESERVE</a>;</div>
|
|
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  }</div>
|
|
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  </div>
|
|
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  <a class="code" href="classripple_1_1base__uint.html">Currency</a> <span class="keyword">const</span> currency = flowDeliver.getCurrency();</div>
|
|
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> initialBalance(flowDeliver.issue());</div>
|
|
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  initialBalance.<a class="code" href="classripple_1_1STAmount.html#a532cc28fd8b3d99c5de749e7e78fd08d">setIssuer</a>(<a class="code" href="namespaceripple.html#a065cda95aed9cb1d66fb81cad0867ef6">noAccount</a>());</div>
|
|
<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  </div>
|
|
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  <span class="comment">// clang-format off</span></div>
|
|
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1TERSubset.html">TER</a> <span class="keyword">const</span> ter = <a class="code" href="namespaceripple.html#a6dd475079b000f7bb0bf568a8ba6688c">trustCreate</a>(</div>
|
|
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  psb, <span class="comment">// payment sandbox</span></div>
|
|
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  destLow, <span class="comment">// is dest low?</span></div>
|
|
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  issuer, <span class="comment">// source</span></div>
|
|
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>, <span class="comment">// destination</span></div>
|
|
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  trustLineKey.<a class="code" href="structripple_1_1Keylet.html#a482983062843a8682fcea76a309c73db">key</a>, <span class="comment">// ledger index</span></div>
|
|
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  sleDst, <span class="comment">// Account to add to</span></div>
|
|
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  <span class="keyword">false</span>, <span class="comment">// authorize account</span></div>
|
|
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  (sleDst->getFlags() & <a class="code" href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a3de81b62b486203f6b8e4f2cd0832ae1">lsfDefaultRipple</a>) == 0,</div>
|
|
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <span class="keyword">false</span>, <span class="comment">// freeze trust line</span></div>
|
|
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  initialBalance, <span class="comment">// zero initial balance</span></div>
|
|
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <a class="code" href="classripple_1_1Issue.html">Issue</a>(currency, <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>), <span class="comment">// limit of zero</span></div>
|
|
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  0, <span class="comment">// quality in</span></div>
|
|
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  0, <span class="comment">// quality out</span></div>
|
|
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  viewJ); <span class="comment">// journal</span></div>
|
|
<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  !<a class="code" href="namespaceripple.html#a5b31f337f444082f547ef1838e7064fc">isTesSuccess</a>(ter))</div>
|
|
<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  {</div>
|
|
<div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <span class="keywordflow">return</span> ter;</div>
|
|
<div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  }</div>
|
|
<div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="comment">// clang-format on</span></div>
|
|
<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  </div>
|
|
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#a4f12513f46ee2c194d6fb0e4d28e5543">update</a>(sleDst);</div>
|
|
<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  </div>
|
|
<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="comment">// Note that we _don't_ need to be careful about destroying</span></div>
|
|
<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="comment">// the trust line if the check cashing fails. The transaction</span></div>
|
|
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <span class="comment">// machinery will automatically clean it up.</span></div>
|
|
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  }</div>
|
|
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  </div>
|
|
<div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="comment">// Since the destination is signing the check, they clearly want</span></div>
|
|
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="comment">// the funds even if their new total funds would exceed the limit</span></div>
|
|
<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="comment">// on their trust line. So we tweak the trust line limits before</span></div>
|
|
<div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="comment">// calling flow and then restore the trust line limits afterwards.</span></div>
|
|
<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="keyword">auto</span> <span class="keyword">const</span> sleTrustLine = psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#afe88196d7aec85f2af00d7cd0b1a28c3">peek</a>(trustLineKey);</div>
|
|
<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">if</span> (!sleTrustLine)</div>
|
|
<div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38cac480d742e7760c48047bb3ccc50a40ef">tecNO_LINE</a>;</div>
|
|
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  </div>
|
|
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <a class="code" href="structripple_1_1TypedField.html">SF_AMOUNT</a> <span class="keyword">const</span>& tweakedLimit = destLow ? <a class="code" href="namespaceripple.html#a823af8711d62eb5661ccab5af1dde03a">sfLowLimit</a> : <a class="code" href="namespaceripple.html#a78b8a880e6176b96eea2351ce8b9db77">sfHighLimit</a>;</div>
|
|
<div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> <span class="keyword">const</span> savedLimit = sleTrustLine->at(tweakedLimit);</div>
|
|
<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  </div>
|
|
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <span class="comment">// Make sure the tweaked limits are restored when we leave scope.</span></div>
|
|
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <a class="code" href="classripple_1_1scope__exit.html">scope_exit</a> fixup(</div>
|
|
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  [&psb, &trustLineKey, &tweakedLimit, &savedLimit]() {</div>
|
|
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="keywordflow">if</span> (<span class="keyword">auto</span> <span class="keyword">const</span> sleTrustLine = psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#afe88196d7aec85f2af00d7cd0b1a28c3">peek</a>(trustLineKey))</div>
|
|
<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  sleTrustLine->at(tweakedLimit) = savedLimit;</div>
|
|
<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  });</div>
|
|
<div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  </div>
|
|
<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="keywordflow">if</span> (checkCashMakesTrustLine)</div>
|
|
<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  {</div>
|
|
<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="comment">// Set the trust line limit to the highest possible value</span></div>
|
|
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  <span class="comment">// while flow runs.</span></div>
|
|
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <a class="code" href="classripple_1_1STAmount.html">STAmount</a> <span class="keyword">const</span> bigAmount(</div>
|
|
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  trustLineIssue, <a class="code" href="classripple_1_1STAmount.html#af88c7b9a2ee49408f4fd17e1ee9f20df">STAmount::cMaxValue</a>, <a class="code" href="classripple_1_1STAmount.html#a84ebd351b1c12b5467b59c9cd4d1640f">STAmount::cMaxOffset</a>);</div>
|
|
<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  sleTrustLine->at(tweakedLimit) = bigAmount;</div>
|
|
<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  }</div>
|
|
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  </div>
|
|
<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <span class="comment">// Let flow() do the heavy lifting on a check for an IOU.</span></div>
|
|
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <span class="keyword">auto</span> <span class="keyword">const</span> result = <a class="code" href="namespaceripple.html#a5b20ec034d803aeea7502c4fe2bfdff7">flow</a>(</div>
|
|
<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  psb,</div>
|
|
<div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  flowDeliver,</div>
|
|
<div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  srcId,</div>
|
|
<div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a>,</div>
|
|
<div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <a class="code" href="classripple_1_1STPathSet.html">STPathSet</a>{},</div>
|
|
<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  <span class="keyword">true</span>, <span class="comment">// default path</span></div>
|
|
<div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  <span class="keyword">static_cast<</span><span class="keywordtype">bool</span><span class="keyword">></span>(optDeliverMin), <span class="comment">// partial payment</span></div>
|
|
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  <span class="keyword">true</span>, <span class="comment">// owner pays transfer fee</span></div>
|
|
<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  <span class="keyword">false</span>, <span class="comment">// offer crossing</span></div>
|
|
<div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  std::nullopt,</div>
|
|
<div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  sleCheck->getFieldAmount(<a class="code" href="namespaceripple.html#aa693ff83cdfe0f5cb821db0000b22928">sfSendMax</a>),</div>
|
|
<div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  viewJ);</div>
|
|
<div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  </div>
|
|
<div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  <span class="keywordflow">if</span> (result.result() != <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>)</div>
|
|
<div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  {</div>
|
|
<div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#afdcc5c07be2cc8022632ed0050a024f1">journal</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>()) << <span class="stringliteral">"flow failed when cashing check."</span>;</div>
|
|
<div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <span class="keywordflow">return</span> result.result();</div>
|
|
<div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  }</div>
|
|
<div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  </div>
|
|
<div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <span class="comment">// Make sure that deliverMin was satisfied.</span></div>
|
|
<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <span class="keywordflow">if</span> (optDeliverMin)</div>
|
|
<div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  {</div>
|
|
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <span class="keywordflow">if</span> (result.actualAmountOut < *optDeliverMin)</div>
|
|
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  {</div>
|
|
<div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#afdcc5c07be2cc8022632ed0050a024f1">journal</a>.<a class="code" href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">warn</a>())</div>
|
|
<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  << <span class="stringliteral">"flow did not produce DeliverMin."</span>;</div>
|
|
<div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38cabd7038b5669becf7271665614c94efb6">tecPATH_PARTIAL</a>;</div>
|
|
<div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  }</div>
|
|
<div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <span class="keywordflow">if</span> (doFix1623 && !checkCashMakesTrustLine)</div>
|
|
<div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  <span class="comment">// Set the delivered_amount metadata.</span></div>
|
|
<div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  <a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#ae41c98e735027c912354391f518e228d">deliver</a>(result.actualAmountOut);</div>
|
|
<div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  }</div>
|
|
<div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  </div>
|
|
<div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <span class="comment">// Set the delivered amount metadata in all cases, not just</span></div>
|
|
<div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <span class="comment">// for DeliverMin.</span></div>
|
|
<div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <span class="keywordflow">if</span> (checkCashMakesTrustLine)</div>
|
|
<div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  <a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#ae41c98e735027c912354391f518e228d">deliver</a>(result.actualAmountOut);</div>
|
|
<div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  </div>
|
|
<div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  sleCheck = psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#afe88196d7aec85f2af00d7cd0b1a28c3">peek</a>(<a class="code" href="namespaceripple_1_1keylet.html#a66624dcb8f66cb8548d032ff97030aa4">keylet::check</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#aa39e5a249ee8c9642a47e1e9a9078f40">sfCheckID</a>]));</div>
|
|
<div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  }</div>
|
|
<div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  }</div>
|
|
<div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  </div>
|
|
<div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <span class="comment">// Check was cashed. If not a self send (and it shouldn't be), remove</span></div>
|
|
<div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  <span class="comment">// check link from destination directory.</span></div>
|
|
<div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  <span class="keywordflow">if</span> (srcId != <a class="code" href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">account_</a> &&</div>
|
|
<div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  !psb.<a class="code" href="classripple_1_1ApplyView.html#a5a06441ef4fdb9b7f6e51437ce4a959f">dirRemove</a>(</div>
|
|
<div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  <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="l00489"></a><span class="lineno"> 489</span>  sleCheck->at(<a class="code" href="namespaceripple.html#abbc38ffa7150da1f1beced78bf0800d2">sfDestinationNode</a>),</div>
|
|
<div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  sleCheck-><a class="code" href="structripple_1_1Keylet.html#a482983062843a8682fcea76a309c73db">key</a>(),</div>
|
|
<div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  <span class="keyword">true</span>))</div>
|
|
<div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  {</div>
|
|
<div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>()) << <span class="stringliteral">"Unable to delete check from destination."</span>;</div>
|
|
<div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</div>
|
|
<div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  }</div>
|
|
<div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  </div>
|
|
<div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  <span class="comment">// Remove check from check owner's directory.</span></div>
|
|
<div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  <span class="keywordflow">if</span> (!psb.<a class="code" href="classripple_1_1ApplyView.html#a5a06441ef4fdb9b7f6e51437ce4a959f">dirRemove</a>(</div>
|
|
<div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  <a class="code" href="namespaceripple_1_1keylet.html#aa9b2ba2df3c3da4cecd1c07cccf7c7f9">keylet::ownerDir</a>(srcId),</div>
|
|
<div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  sleCheck->at(<a class="code" href="namespaceripple.html#a7038e25fafd9239c031a42b0f285ddf4">sfOwnerNode</a>),</div>
|
|
<div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  sleCheck-><a class="code" href="structripple_1_1Keylet.html#a482983062843a8682fcea76a309c73db">key</a>(),</div>
|
|
<div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  <span class="keyword">true</span>))</div>
|
|
<div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  {</div>
|
|
<div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  JLOG(<a class="code" href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">j_</a>.<a class="code" href="classbeast_1_1Journal.html#a3dfb8e2e3eecccdb5cf78ff21bca069c">fatal</a>()) << <span class="stringliteral">"Unable to delete check from owner."</span>;</div>
|
|
<div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">tefBAD_LEDGER</a>;</div>
|
|
<div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  }</div>
|
|
<div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  </div>
|
|
<div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <span class="comment">// If we succeeded, update the check owner's reserve.</span></div>
|
|
<div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  <a class="code" href="namespaceripple.html#a7e31af9d90dac8c9e4272bf597d83fb4">adjustOwnerCount</a>(psb, psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#afe88196d7aec85f2af00d7cd0b1a28c3">peek</a>(<a class="code" href="namespaceripple_1_1keylet.html#a50c370db96b4fdcdd202d9c2c38afce9">keylet::account</a>(srcId)), -1, viewJ);</div>
|
|
<div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  </div>
|
|
<div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="comment">// Remove check from ledger.</span></div>
|
|
<div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  psb.<a class="code" href="classripple_1_1detail_1_1ApplyViewBase.html#a165c96d3bf59c98b608ffabcf2f70276">erase</a>(sleCheck);</div>
|
|
<div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  </div>
|
|
<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  psb.<a class="code" href="classripple_1_1PaymentSandbox.html#a69d4b79f512abb2d67e3b3fefa76008b">apply</a>(<a class="code" href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ctx_</a>.<a class="code" href="classripple_1_1ApplyContext.html#a77dc079164717b62995593c7633a5160">rawView</a>());</div>
|
|
<div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">tesSUCCESS</a>;</div>
|
|
<div class="line"><a name="l00516"></a><span class="lineno"> 516</span> }</div>
|
|
<div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  </div>
|
|
<div class="line"><a name="l00518"></a><span class="lineno"> 518</span> } <span class="comment">// namespace ripple</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="anamespaceripple_html_a0d78fe5b5eff36774b5be525cbcc3972"><div class="ttname"><a href="namespaceripple.html#a0d78fe5b5eff36774b5be525cbcc3972">ripple::badCurrency</a></div><div class="ttdeci">Currency const & badCurrency()</div><div class="ttdoc">We deliberately disallow the currency that looks like "XRP" because too many people were using it ins...</div><div class="ttdef"><b>Definition:</b> <a href="UintTypes_8cpp_source.html#l00135">UintTypes.cpp:135</a></div></div>
|
|
<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="anamespaceripple_html_aee6c41ec9be20b8705502ae9290ef2b0"><div class="ttname"><a href="namespaceripple.html#aee6c41ec9be20b8705502ae9290ef2b0">ripple::sfOwnerCount</a></div><div class="ttdeci">const SF_UINT32 sfOwnerCount</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38ca608da193a4a22ae1c78d76b6e843b7e6"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca608da193a4a22ae1c78d76b6e843b7e6">ripple::tecFROZEN</a></div><div class="ttdeci">@ tecFROZEN</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00267">TER.h:267</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="astructripple_1_1Keylet_html"><div class="ttname"><a href="structripple_1_1Keylet.html">ripple::Keylet</a></div><div class="ttdoc">A pair of SHAMap key and LedgerEntryType.</div><div class="ttdef"><b>Definition:</b> <a href="Keylet_8h_source.html#l00038">Keylet.h:38</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Issue_html"><div class="ttname"><a href="classripple_1_1Issue.html">ripple::Issue</a></div><div class="ttdoc">A currency issued by an account.</div><div class="ttdef"><b>Definition:</b> <a href="Issue_8h_source.html#l00034">Issue.h:34</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa693ff83cdfe0f5cb821db0000b22928"><div class="ttname"><a href="namespaceripple.html#aa693ff83cdfe0f5cb821db0000b22928">ripple::sfSendMax</a></div><div class="ttdeci">const SF_AMOUNT sfSendMax</div></div>
|
|
<div class="ttc" id="aclassripple_1_1Rules_html_a1a8388a2b9588aa9446ece92a88e0dd2"><div class="ttname"><a href="classripple_1_1Rules.html#a1a8388a2b9588aa9446ece92a88e0dd2">ripple::Rules::enabled</a></div><div class="ttdeci">bool enabled(uint256 const &feature) const</div><div class="ttdoc">Returns true if a feature is enabled.</div><div class="ttdef"><b>Definition:</b> <a href="Rules_8cpp_source.html#l00094">Rules.cpp:94</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1PreclaimContext_html_a05d5cf6207c1127c25dcd7c3f763b9c5"><div class="ttname"><a href="structripple_1_1PreclaimContext.html#a05d5cf6207c1127c25dcd7c3f763b9c5">ripple::PreclaimContext::view</a></div><div class="ttdeci">ReadView const & view</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00056">Transactor.h:56</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a17a9a9b903b66e49f5413d82ce79f085a852cabbbe21a9b4d63aff777eceab2fd"><div class="ttname"><a href="namespaceripple.html#a17a9a9b903b66e49f5413d82ce79f085a852cabbbe21a9b4d63aff777eceab2fd">ripple::fhZERO_IF_FROZEN</a></div><div class="ttdeci">@ fhZERO_IF_FROZEN</div><div class="ttdef"><b>Definition:</b> <a href="View_8h_source.html#l00076">View.h:76</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a7038e25fafd9239c031a42b0f285ddf4"><div class="ttname"><a href="namespaceripple.html#a7038e25fafd9239c031a42b0f285ddf4">ripple::sfOwnerNode</a></div><div class="ttdeci">const SF_UINT64 sfOwnerNode</div></div>
|
|
<div class="ttc" id="astructripple_1_1TypedField_html"><div class="ttname"><a href="structripple_1_1TypedField.html">ripple::TypedField</a></div><div class="ttdoc">A field with a type known at compile time.</div><div class="ttdef"><b>Definition:</b> <a href="SField_8h_source.html#l00271">SField.h:271</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_afe21c8454670d46fb93751a5edffed46a47ebc45c5ddd8a242d47c055bec0de63"><div class="ttname"><a href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46a47ebc45c5ddd8a242d47c055bec0de63">ripple::temBAD_CURRENCY</a></div><div class="ttdeci">@ temBAD_CURRENCY</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00085">TER.h:85</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1PreclaimContext_html_a534551c8ca0dd7afc8fe9098bf9da780"><div class="ttname"><a href="structripple_1_1PreclaimContext.html#a534551c8ca0dd7afc8fe9098bf9da780">ripple::PreclaimContext::j</a></div><div class="ttdeci">const beast::Journal j</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00060">Transactor.h:60</a></div></div>
|
|
<div class="ttc" id="aclassbeast_1_1Journal_html_abbe082bd27ca0f1d1365af2824e4f85b"><div class="ttname"><a href="classbeast_1_1Journal.html#abbe082bd27ca0f1d1365af2824e4f85b">beast::Journal::trace</a></div><div class="ttdeci">Stream trace() const</div><div class="ttdoc">Severity stream access functions.</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00309">Journal.h:309</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a15aa3b3032d0908932dc5abf4b1ef862"><div class="ttname"><a href="namespaceripple.html#a15aa3b3032d0908932dc5abf4b1ef862">ripple::sfDestination</a></div><div class="ttdeci">const SF_ACCOUNT sfDestination</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a29758397ce451beaa436c3a9dfc83030"><div class="ttname"><a href="namespaceripple.html#a29758397ce451beaa436c3a9dfc83030">ripple::sfAmount</a></div><div class="ttdeci">const SF_AMOUNT sfAmount</div></div>
|
|
<div class="ttc" id="aclassripple_1_1PaymentSandbox_html"><div class="ttname"><a href="classripple_1_1PaymentSandbox.html">ripple::PaymentSandbox</a></div><div class="ttdoc">A wrapper which makes credits unavailable to balances.</div><div class="ttdef"><b>Definition:</b> <a href="PaymentSandbox_8h_source.html#l00112">PaymentSandbox.h:112</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Transactor_html_aafdaa4e246ee6879df9cbbf2482dcc7d"><div class="ttname"><a href="classripple_1_1Transactor.html#aafdaa4e246ee6879df9cbbf2482dcc7d">ripple::Transactor::j_</a></div><div class="ttdeci">const beast::Journal j_</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00089">Transactor.h:89</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a5b31f337f444082f547ef1838e7064fc"><div class="ttname"><a href="namespaceripple.html#a5b31f337f444082f547ef1838e7064fc">ripple::isTesSuccess</a></div><div class="ttdeci">bool isTesSuccess(TER x)</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00594">TER.h:594</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa39e5a249ee8c9642a47e1e9a9078f40"><div class="ttname"><a href="namespaceripple.html#aa39e5a249ee8c9642a47e1e9a9078f40">ripple::sfCheckID</a></div><div class="ttdeci">const SF_UINT256 sfCheckID</div></div>
|
|
<div class="ttc" id="aclassripple_1_1CashCheck_html_af9c0cf35c7a36a4eadb2c25e73bd394a"><div class="ttname"><a href="classripple_1_1CashCheck.html#af9c0cf35c7a36a4eadb2c25e73bd394a">ripple::CashCheck::preflight</a></div><div class="ttdeci">static NotTEC preflight(PreflightContext const &ctx)</div><div class="ttdef"><b>Definition:</b> <a href="CashCheck_8cpp_source.html#l00036">CashCheck.cpp:36</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a4a9c7b33fef9015d6406302ef80b63c5af37617abe9ad741cd823746961f1fb3a"><div class="ttname"><a href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5af37617abe9ad741cd823746961f1fb3a">ripple::lsfLowAuth</a></div><div class="ttdeci">@ lsfLowAuth</div><div class="ttdef"><b>Definition:</b> <a href="LedgerFormats_8h_source.html#l00254">LedgerFormats.h:254</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1ApplyViewBase_html_ab5b90b656223e19272dfe10e2dcd7f56"><div class="ttname"><a href="classripple_1_1detail_1_1ApplyViewBase.html#ab5b90b656223e19272dfe10e2dcd7f56">ripple::detail::ApplyViewBase::exists</a></div><div class="ttdeci">bool exists(Keylet const &k) const override</div><div class="ttdoc">Determine if a state item exists.</div><div class="ttdef"><b>Definition:</b> <a href="ApplyViewBase_8cpp_source.html#l00058">ApplyViewBase.cpp:58</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1ReadView_html_a9bbdb3fb4754482a8d6c6e6d25c2d1eb"><div class="ttname"><a href="classripple_1_1ReadView.html#a9bbdb3fb4754482a8d6c6e6d25c2d1eb">ripple::ReadView::fees</a></div><div class="ttdeci">virtual Fees const & fees() const =0</div><div class="ttdoc">Returns the fees for the base ledger.</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38caa3ac7c997274040539a497cadc280b22"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caa3ac7c997274040539a497cadc280b22">ripple::tecDST_TAG_NEEDED</a></div><div class="ttdeci">@ tecDST_TAG_NEEDED</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00273">TER.h:273</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1ApplyViewBase_html_a4f12513f46ee2c194d6fb0e4d28e5543"><div class="ttname"><a href="classripple_1_1detail_1_1ApplyViewBase.html#a4f12513f46ee2c194d6fb0e4d28e5543">ripple::detail::ApplyViewBase::update</a></div><div class="ttdeci">void update(std::shared_ptr< SLE > const &sle) override</div><div class="ttdoc">Indicate changes to a peeked SLE.</div><div class="ttdef"><b>Definition:</b> <a href="ApplyViewBase_8cpp_source.html#l00146">ApplyViewBase.cpp:146</a></div></div>
|
|
<div class="ttc" id="aclassbeast_1_1Journal_html_ad8fefe3e8ad583e1ed1bf02094ac3d8f"><div class="ttname"><a href="classbeast_1_1Journal.html#ad8fefe3e8ad583e1ed1bf02094ac3d8f">beast::Journal::warn</a></div><div class="ttdeci">Stream warn() const</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00327">Journal.h:327</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_ad574e2b04fc8231900df14881418af18"><div class="ttname"><a href="namespaceripple.html#ad574e2b04fc8231900df14881418af18">ripple::hasExpired</a></div><div class="ttdeci">bool hasExpired(ReadView const &view, std::optional< std::uint32_t > const &exp)</div><div class="ttdoc">Determines whether the given expiration time has passed.</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l00179">View.cpp:179</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1ApplyContext_html_afdcc5c07be2cc8022632ed0050a024f1"><div class="ttname"><a href="classripple_1_1ApplyContext.html#afdcc5c07be2cc8022632ed0050a024f1">ripple::ApplyContext::journal</a></div><div class="ttdeci">const beast::Journal journal</div><div class="ttdef"><b>Definition:</b> <a href="ApplyContext_8h_source.html#l00051">ApplyContext.h:51</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a3e312ecdb199409dca142d307a3e0e5b"><div class="ttname"><a href="namespaceripple.html#a3e312ecdb199409dca142d307a3e0e5b">ripple::isLegalNet</a></div><div class="ttdeci">bool isLegalNet(STAmount const &value)</div><div class="ttdef"><b>Definition:</b> <a href="STAmount_8h_source.html#l00446">STAmount.h:446</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1ApplyContext_html_a77dc079164717b62995593c7633a5160"><div class="ttname"><a href="classripple_1_1ApplyContext.html#a77dc079164717b62995593c7633a5160">ripple::ApplyContext::rawView</a></div><div class="ttdeci">RawView & rawView()</div><div class="ttdef"><b>Definition:</b> <a href="ApplyContext_8h_source.html#l00067">ApplyContext.h:67</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STAmount_html_a532cc28fd8b3d99c5de749e7e78fd08d"><div class="ttname"><a href="classripple_1_1STAmount.html#a532cc28fd8b3d99c5de749e7e78fd08d">ripple::STAmount::setIssuer</a></div><div class="ttdeci">void setIssuer(AccountID const &uIssuer)</div><div class="ttdef"><b>Definition:</b> <a href="STAmount_8h_source.html#l00433">STAmount.h:433</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1ApplyViewBase_html_a08bb2668a3260801e8f7d85b4242eb6c"><div class="ttname"><a href="classripple_1_1detail_1_1ApplyViewBase.html#a08bb2668a3260801e8f7d85b4242eb6c">ripple::detail::ApplyViewBase::fees</a></div><div class="ttdeci">Fees const & fees() const override</div><div class="ttdoc">Returns the fees for the base ledger.</div><div class="ttdef"><b>Definition:</b> <a href="ApplyViewBase_8cpp_source.html#l00046">ApplyViewBase.cpp:46</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1PreflightContext_html_a7db9100a0f215cba1c093674692601c4"><div class="ttname"><a href="structripple_1_1PreflightContext.html#a7db9100a0f215cba1c093674692601c4">ripple::PreflightContext::j</a></div><div class="ttdeci">const beast::Journal j</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00038">Transactor.h:38</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STPathSet_html"><div class="ttname"><a href="classripple_1_1STPathSet.html">ripple::STPathSet</a></div><div class="ttdef"><b>Definition:</b> <a href="STPathSet_8h_source.html#l00176">STPathSet.h:176</a></div></div>
|
|
<div class="ttc" id="aalgorithm_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/algorithm.html">algorithm</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a5dfb437ade69624474bbe4125ceb791a"><div class="ttname"><a href="namespaceripple.html#a5dfb437ade69624474bbe4125ceb791a">ripple::preflight1</a></div><div class="ttdeci">NotTEC preflight1(PreflightContext const &ctx)</div><div class="ttdoc">Performs early sanity checks on the account and fee fields.</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8cpp_source.html#l00057">Transactor.cpp:57</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a4a9c7b33fef9015d6406302ef80b63c5ae6db21adf463a223e362b44f0fd54663"><div class="ttname"><a href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5ae6db21adf463a223e362b44f0fd54663">ripple::lsfHighAuth</a></div><div class="ttdeci">@ lsfHighAuth</div><div class="ttdef"><b>Definition:</b> <a href="LedgerFormats_8h_source.html#l00255">LedgerFormats.h:255</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="aclassripple_1_1STAmount_html_aaac822e5948df5f12b6eaf48feaf1684"><div class="ttname"><a href="classripple_1_1STAmount.html#aaac822e5948df5f12b6eaf48feaf1684">ripple::STAmount::getIssuer</a></div><div class="ttdeci">AccountID const & getIssuer() const</div><div class="ttdef"><b>Definition:</b> <a href="STAmount_8h_source.html#l00359">STAmount.h:359</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_ae3182ff3db5f7f67e4fe8bcd69316727"><div class="ttname"><a href="namespaceripple.html#ae3182ff3db5f7f67e4fe8bcd69316727">ripple::sfExpiration</a></div><div class="ttdeci">const SF_UINT32 sfExpiration</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>
|
|
<div class="ttc" id="aclassripple_1_1ApplyView_html_a5a06441ef4fdb9b7f6e51437ce4a959f"><div class="ttname"><a href="classripple_1_1ApplyView.html#a5a06441ef4fdb9b7f6e51437ce4a959f">ripple::ApplyView::dirRemove</a></div><div class="ttdeci">bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)</div><div class="ttdoc">Remove an entry from a directory.</div><div class="ttdef"><b>Definition:</b> <a href="ApplyView_8cpp_source.html#l00189">ApplyView.cpp:189</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1Keylet_html_a482983062843a8682fcea76a309c73db"><div class="ttname"><a href="structripple_1_1Keylet.html#a482983062843a8682fcea76a309c73db">ripple::Keylet::key</a></div><div class="ttdeci">uint256 key</div><div class="ttdef"><b>Definition:</b> <a href="Keylet_8h_source.html#l00040">Keylet.h:40</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< 160, detail::AccountIDTag ></a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a2695cfe5d7b5e17b9a0ed4ec86244ec5"><div class="ttname"><a href="namespaceripple.html#a2695cfe5d7b5e17b9a0ed4ec86244ec5">ripple::sfDeliverMin</a></div><div class="ttdeci">const SF_AMOUNT sfDeliverMin</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_afe21c8454670d46fb93751a5edffed46aa4754e0f122658747650b3b1c0a846a8"><div class="ttname"><a href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46aa4754e0f122658747650b3b1c0a846a8">ripple::temINVALID_FLAG</a></div><div class="ttdeci">@ temINVALID_FLAG</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00106">TER.h:106</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a823af8711d62eb5661ccab5af1dde03a"><div class="ttname"><a href="namespaceripple.html#a823af8711d62eb5661ccab5af1dde03a">ripple::sfLowLimit</a></div><div class="ttdeci">const SF_AMOUNT sfLowLimit</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a4a9c7b33fef9015d6406302ef80b63c5a44c3bc643086a0beb87e3aaeb544e6ad"><div class="ttname"><a href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a44c3bc643086a0beb87e3aaeb544e6ad">ripple::lsfRequireAuth</a></div><div class="ttdeci">@ lsfRequireAuth</div><div class="ttdef"><b>Definition:</b> <a href="LedgerFormats_8h_source.html#l00226">LedgerFormats.h:226</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f"><div class="ttname"><a href="namespaceripple.html#a75cb21d7f1df42f2fdc8efddb79b63f4ab5c44faf987ebd7709fa11a2c8502b5f">ripple::tefBAD_LEDGER</a></div><div class="ttdeci">@ tefBAD_LEDGER</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00149">TER.h:149</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a7e31af9d90dac8c9e4272bf597d83fb4"><div class="ttname"><a href="namespaceripple.html#a7e31af9d90dac8c9e4272bf597d83fb4">ripple::adjustOwnerCount</a></div><div class="ttdeci">void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)</div><div class="ttdoc">Adjust the owner count up or down.</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l00713">View.cpp:713</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a5b20ec034d803aeea7502c4fe2bfdff7"><div class="ttname"><a href="namespaceripple.html#a5b20ec034d803aeea7502c4fe2bfdff7">ripple::flow</a></div><div class="ttdeci">path::RippleCalc::Output flow(PaymentSandbox &view, STAmount const &deliver, AccountID const &src, AccountID const &dst, STPathSet const &paths, bool defaultPaths, bool partialPayment, bool ownerPaysTransferFee, bool offerCrossing, std::optional< Quality > const &limitQuality, std::optional< STAmount > const &sendMax, beast::Journal j, path::detail::FlowDebugInfo *flowDebugInfo=nullptr)</div><div class="ttdoc">Make a payment from the src account to the dst account.</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a4a9c7b33fef9015d6406302ef80b63c5a3de81b62b486203f6b8e4f2cd0832ae1"><div class="ttname"><a href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a3de81b62b486203f6b8e4f2cd0832ae1">ripple::lsfDefaultRipple</a></div><div class="ttdeci">@ lsfDefaultRipple</div><div class="ttdef"><b>Definition:</b> <a href="LedgerFormats_8h_source.html#l00232">LedgerFormats.h:232</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_1_1keylet_html_a50c370db96b4fdcdd202d9c2c38afce9"><div class="ttname"><a href="namespaceripple_1_1keylet.html#a50c370db96b4fdcdd202d9c2c38afce9">ripple::keylet::account</a></div><div class="ttdeci">Keylet account(AccountID const &id) noexcept</div><div class="ttdoc">AccountID root.</div><div class="ttdef"><b>Definition:</b> <a href="Indexes_8cpp_source.html#l00133">Indexes.cpp:133</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1CashCheck_html_a1b26e1e01488d2a3d05fbd6b671d2063"><div class="ttname"><a href="classripple_1_1CashCheck.html#a1b26e1e01488d2a3d05fbd6b671d2063">ripple::CashCheck::preclaim</a></div><div class="ttdeci">static TER preclaim(PreclaimContext const &ctx)</div><div class="ttdef"><b>Definition:</b> <a href="CashCheck_8cpp_source.html#l00083">CashCheck.cpp:83</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1TERSubset_html"><div class="ttname"><a href="classripple_1_1TERSubset.html">ripple::TERSubset</a></div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00337">TER.h:337</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1scope__exit_html"><div class="ttname"><a href="classripple_1_1scope__exit.html">ripple::scope_exit</a></div><div class="ttdef"><b>Definition:</b> <a href="scope_8h_source.html#l00042">scope.h:42</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38caecd11145ac07375d1c0793e699932969"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caecd11145ac07375d1c0793e699932969">ripple::tecFAILED_PROCESSING</a></div><div class="ttdeci">@ tecFAILED_PROCESSING</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00250">TER.h:250</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_af2c25b95b708d565d681958fbd20d2b6"><div class="ttname"><a href="namespaceripple.html#af2c25b95b708d565d681958fbd20d2b6">ripple::fix1623</a></div><div class="ttdeci">const uint256 fix1623</div></div>
|
|
<div class="ttc" id="aclassripple_1_1STAmount_html"><div class="ttname"><a href="classripple_1_1STAmount.html">ripple::STAmount</a></div><div class="ttdef"><b>Definition:</b> <a href="STAmount_8h_source.html#l00045">STAmount.h:45</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38cad6e984aac9838459128d97b668ec1e4f"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38cad6e984aac9838459128d97b668ec1e4f">ripple::tecUNFUNDED_PAYMENT</a></div><div class="ttdeci">@ tecUNFUNDED_PAYMENT</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00249">TER.h:249</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_abbc38ffa7150da1f1beced78bf0800d2"><div class="ttname"><a href="namespaceripple.html#abbc38ffa7150da1f1beced78bf0800d2">ripple::sfDestinationNode</a></div><div class="ttdeci">const SF_UINT64 sfDestinationNode</div></div>
|
|
<div class="ttc" id="aclassbeast_1_1Journal_html_a49b0713e65bb8e2c51b76fbf16252afe"><div class="ttname"><a href="classbeast_1_1Journal.html#a49b0713e65bb8e2c51b76fbf16252afe">beast::Journal::error</a></div><div class="ttdeci">Stream error() const</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00333">Journal.h:333</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38ca93e4e159f8759ea0948423c699e7cf77"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca93e4e159f8759ea0948423c699e7cf77">ripple::tecINTERNAL</a></div><div class="ttdeci">@ tecINTERNAL</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00274">TER.h:274</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_afc787da3584a7facdc3f19fc366f0b70"><div class="ttname"><a href="namespaceripple.html#afc787da3584a7facdc3f19fc366f0b70">ripple::xrpLiquid</a></div><div class="ttdeci">XRPAmount xrpLiquid(ReadView const &view, AccountID const &id, std::int32_t ownerCountAdj, beast::Journal j)</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l00331">View.cpp:331</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STObject_html_af5aa57043ec772da30341e3c3b823d7f"><div class="ttname"><a href="classripple_1_1STObject.html#af5aa57043ec772da30341e3c3b823d7f">ripple::STObject::getFlags</a></div><div class="ttdeci">std::uint32_t getFlags() const</div><div class="ttdef"><b>Definition:</b> <a href="STObject_8cpp_source.html#l00481">STObject.cpp:481</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STTx_html"><div class="ttname"><a href="classripple_1_1STTx.html">ripple::STTx</a></div><div class="ttdef"><b>Definition:</b> <a href="STTx_8h_source.html#l00045">STTx.h:45</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_afe21c8454670d46fb93751a5edffed46a07dedb576e47ed9570e5acc5b4b1d3ea"><div class="ttname"><a href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46a07dedb576e47ed9570e5acc5b4b1d3ea">ripple::temBAD_AMOUNT</a></div><div class="ttdeci">@ temBAD_AMOUNT</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00084">TER.h:84</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1ApplyContext_html_ae41c98e735027c912354391f518e228d"><div class="ttname"><a href="classripple_1_1ApplyContext.html#ae41c98e735027c912354391f518e228d">ripple::ApplyContext::deliver</a></div><div class="ttdeci">void deliver(STAmount const &amount)</div><div class="ttdoc">Sets the DeliveredAmount field in the metadata.</div><div class="ttdef"><b>Definition:</b> <a href="ApplyContext_8h_source.html#l00074">ApplyContext.h:74</a></div></div>
|
|
<div class="ttc" id="ainteger_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a78b8a880e6176b96eea2351ce8b9db77"><div class="ttname"><a href="namespaceripple.html#a78b8a880e6176b96eea2351ce8b9db77">ripple::sfHighLimit</a></div><div class="ttdeci">const SF_AMOUNT sfHighLimit</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38cabd7038b5669becf7271665614c94efb6"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38cabd7038b5669becf7271665614c94efb6">ripple::tecPATH_PARTIAL</a></div><div class="ttdeci">@ tecPATH_PARTIAL</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00246">TER.h:246</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_1_1keylet_html_ad7913ec52c58534ee1601ab21956123f"><div class="ttname"><a href="namespaceripple_1_1keylet.html#ad7913ec52c58534ee1601ab21956123f">ripple::keylet::line</a></div><div class="ttdeci">Keylet line(AccountID const &id0, AccountID const &id1, Currency const &currency) noexcept</div><div class="ttdoc">The index of a trust line for a given currency.</div><div class="ttdef"><b>Definition:</b> <a href="Indexes_8cpp_source.html#l00193">Indexes.cpp:193</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a5f719e22f7b14728584f07b665dfd7cc"><div class="ttname"><a href="namespaceripple.html#a5f719e22f7b14728584f07b665dfd7cc">ripple::featureChecks</a></div><div class="ttdeci">const uint256 featureChecks</div></div>
|
|
<div class="ttc" id="aclassripple_1_1ReadView_html_a3351e0244f921234d5ba005a07ddf539"><div class="ttname"><a href="classripple_1_1ReadView.html#a3351e0244f921234d5ba005a07ddf539">ripple::ReadView::read</a></div><div class="ttdeci">virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0</div><div class="ttdoc">Return the state item associated with a key.</div></div>
|
|
<div class="ttc" id="aclassripple_1_1ApplyContext_html_a77320121a8dc95fb701fe4fa477c1b3d"><div class="ttname"><a href="classripple_1_1ApplyContext.html#a77320121a8dc95fb701fe4fa477c1b3d">ripple::ApplyContext::view</a></div><div class="ttdeci">ApplyView & view()</div><div class="ttdef"><b>Definition:</b> <a href="ApplyContext_8h_source.html#l00054">ApplyContext.h:54</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1PreclaimContext_html_a8e1240b39791cf309b9caaffe8e5d306"><div class="ttname"><a href="structripple_1_1PreclaimContext.html#a8e1240b39791cf309b9caaffe8e5d306">ripple::PreclaimContext::tx</a></div><div class="ttdeci">STTx const & tx</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00058">Transactor.h:58</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a15bb971c7e554fc3df218aba54c33fcc"><div class="ttname"><a href="namespaceripple.html#a15bb971c7e554fc3df218aba54c33fcc">ripple::accountFunds</a></div><div class="ttdeci">STAmount accountFunds(ReadView const &view, AccountID const &id, STAmount const &saDefault, FreezeHandling freezeHandling, beast::Journal j)</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l00267">View.cpp:267</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a5ee3f52d4feaf2ad6775033fbae860da"><div class="ttname"><a href="namespaceripple.html#a5ee3f52d4feaf2ad6775033fbae860da">ripple::transferXRP</a></div><div class="ttdeci">TER transferXRP(ApplyView &view, AccountID const &from, AccountID const &to, STAmount const &amount, beast::Journal j)</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l01447">View.cpp:1447</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a4a9c7b33fef9015d6406302ef80b63c5a2243e81f83c4191286c8c46bdd86d6f3"><div class="ttname"><a href="namespaceripple.html#a4a9c7b33fef9015d6406302ef80b63c5a2243e81f83c4191286c8c46bdd86d6f3">ripple::lsfRequireDestTag</a></div><div class="ttdeci">@ lsfRequireDestTag</div><div class="ttdef"><b>Definition:</b> <a href="LedgerFormats_8h_source.html#l00224">LedgerFormats.h:224</a></div></div>
|
|
<div class="ttc" id="amin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a></div><div class="ttdeci">T min(T... args)</div></div>
|
|
<div class="ttc" id="astructripple_1_1PreclaimContext_html"><div class="ttname"><a href="structripple_1_1PreclaimContext.html">ripple::PreclaimContext</a></div><div class="ttdoc">State information when determining if a tx is likely to claim a fee.</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00052">Transactor.h:52</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1ApplyViewBase_html_a165c96d3bf59c98b608ffabcf2f70276"><div class="ttname"><a href="classripple_1_1detail_1_1ApplyViewBase.html#a165c96d3bf59c98b608ffabcf2f70276">ripple::detail::ApplyViewBase::erase</a></div><div class="ttdeci">void erase(std::shared_ptr< SLE > const &sle) override</div><div class="ttdoc">Remove a peeked SLE.</div><div class="ttdef"><b>Definition:</b> <a href="ApplyViewBase_8cpp_source.html#l00134">ApplyViewBase.cpp:134</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STAmount_html_af3a02d7e9cd0b11509a90e0e6980bd64"><div class="ttname"><a href="classripple_1_1STAmount.html#af3a02d7e9cd0b11509a90e0e6980bd64">ripple::STAmount::native</a></div><div class="ttdeci">bool native() const noexcept</div><div class="ttdef"><b>Definition:</b> <a href="STAmount_8h_source.html#l00329">STAmount.h:329</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_1Application_html_a2897c28a5b5040e80e66f676d201d03f"><div class="ttname"><a href="classripple_1_1Application.html#a2897c28a5b5040e80e66f676d201d03f">ripple::Application::journal</a></div><div class="ttdeci">virtual beast::Journal journal(std::string const &name)=0</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a6dd475079b000f7bb0bf568a8ba6688c"><div class="ttname"><a href="namespaceripple.html#a6dd475079b000f7bb0bf568a8ba6688c">ripple::trustCreate</a></div><div class="ttdeci">TER trustCreate(ApplyView &view, const bool bSrcHigh, AccountID const &uSrcAccountID, AccountID const &uDstAccountID, uint256 const &uIndex, SLE::ref sleAccount, const bool bAuth, const bool bNoRipple, const bool bFreeze, STAmount const &saBalance, STAmount const &saLimit, std::uint32_t uQualityIn, std::uint32_t uQualityOut, beast::Journal j)</div><div class="ttdoc">Create a trust line.</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l00739">View.cpp:739</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38ca16147ffb75207394488047fbd471dc9e"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca16147ffb75207394488047fbd471dc9e">ripple::tecNO_LINE_INSUF_RESERVE</a></div><div class="ttdeci">@ tecNO_LINE_INSUF_RESERVE</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00256">TER.h:256</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38cac480d742e7760c48047bb3ccc50a40ef"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38cac480d742e7760c48047bb3ccc50a40ef">ripple::tecNO_LINE</a></div><div class="ttdeci">@ tecNO_LINE</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00265">TER.h:265</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38caede598f88bbd44e4df1c4e0d418c4cdc"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caede598f88bbd44e4df1c4e0d418c4cdc">ripple::tecEXPIRED</a></div><div class="ttdeci">@ tecEXPIRED</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00278">TER.h:278</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_afe21c8454670d46fb93751a5edffed46ac3482079467d517ea82aa9c8fa693d21"><div class="ttname"><a href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46ac3482079467d517ea82aa9c8fa693d21">ripple::temDISABLED</a></div><div class="ttdeci">@ temDISABLED</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00109">TER.h:109</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1PaymentSandbox_html_a69d4b79f512abb2d67e3b3fefa76008b"><div class="ttname"><a href="classripple_1_1PaymentSandbox.html#a69d4b79f512abb2d67e3b3fefa76008b">ripple::PaymentSandbox::apply</a></div><div class="ttdeci">void apply(RawView &to)</div><div class="ttdoc">Apply changes to base view.</div><div class="ttdef"><b>Definition:</b> <a href="PaymentSandbox_8cpp_source.html#l00254">PaymentSandbox.cpp:254</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1ReadView_html_aaf2fa03be723bb78d8bdf41614a75a30"><div class="ttname"><a href="classripple_1_1ReadView.html#aaf2fa03be723bb78d8bdf41614a75a30">ripple::ReadView::rules</a></div><div class="ttdeci">virtual Rules const & rules() const =0</div><div class="ttdoc">Returns the tx processing rules.</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_ac1371098a8a7c1e1238290d0220dc941"><div class="ttname"><a href="namespaceripple.html#ac1371098a8a7c1e1238290d0220dc941">ripple::sfFlags</a></div><div class="ttdeci">const SF_UINT32 sfFlags</div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38ca33d363e51ee15c8bd4f5d7c4e4518def"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca33d363e51ee15c8bd4f5d7c4e4518def">ripple::tecNO_ISSUER</a></div><div class="ttdeci">@ tecNO_ISSUER</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00263">TER.h:263</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a999804f69d4c945a231d41eadabec2b8"><div class="ttname"><a href="namespaceripple.html#a999804f69d4c945a231d41eadabec2b8">ripple::sfDestinationTag</a></div><div class="ttdeci">const SF_UINT32 sfDestinationTag</div></div>
|
|
<div class="ttc" id="aclassripple_1_1Transactor_html_abb2f6f5d7fd8c663c5df76b6fcba2c49"><div class="ttname"><a href="classripple_1_1Transactor.html#abb2f6f5d7fd8c663c5df76b6fcba2c49">ripple::Transactor::mPriorBalance</a></div><div class="ttdeci">XRPAmount mPriorBalance</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00092">Transactor.h:92</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38ca9af7057961bc54674f4a6c2dd8ed6ab9"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca9af7057961bc54674f4a6c2dd8ed6ab9">ripple::tecNO_PERMISSION</a></div><div class="ttdeci">@ tecNO_PERMISSION</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00269">TER.h:269</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Transactor_html_aef4ef0a89b5595b2a688b89e4ecef833"><div class="ttname"><a href="classripple_1_1Transactor.html#aef4ef0a89b5595b2a688b89e4ecef833">ripple::Transactor::ctx_</a></div><div class="ttdeci">ApplyContext & ctx_</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00088">Transactor.h:88</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 &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_a5bab99595719d22579e10d21cf048eb0"><div class="ttname"><a href="namespaceripple.html#a5bab99595719d22579e10d21cf048eb0">ripple::sfAccount</a></div><div class="ttdeci">const SF_ACCOUNT sfAccount</div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1ApplyViewBase_html_afe88196d7aec85f2af00d7cd0b1a28c3"><div class="ttname"><a href="classripple_1_1detail_1_1ApplyViewBase.html#afe88196d7aec85f2af00d7cd0b1a28c3">ripple::detail::ApplyViewBase::peek</a></div><div class="ttdeci">std::shared_ptr< SLE > peek(Keylet const &k) override</div><div class="ttdoc">Prepare to modify the SLE associated with key.</div><div class="ttdef"><b>Definition:</b> <a href="ApplyViewBase_8cpp_source.html#l00128">ApplyViewBase.cpp:128</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38ca02ea20c787300a40fe375ba3d6405258"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38ca02ea20c787300a40fe375ba3d6405258">ripple::tecNO_ENTRY</a></div><div class="ttdeci">@ tecNO_ENTRY</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00270">TER.h:270</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1ApplyViewBase_html_af16244cf2efd903b4575a0b85c94d159"><div class="ttname"><a href="classripple_1_1detail_1_1ApplyViewBase.html#af16244cf2efd903b4575a0b85c94d159">ripple::detail::ApplyViewBase::rules</a></div><div class="ttdeci">Rules const & rules() const override</div><div class="ttdoc">Returns the tx processing rules.</div><div class="ttdef"><b>Definition:</b> <a href="ApplyViewBase_8cpp_source.html#l00052">ApplyViewBase.cpp:52</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_afe21c8454670d46fb93751a5edffed46a6c750a245b6efb84fdc4ab34dc010328"><div class="ttname"><a href="namespaceripple.html#afe21c8454670d46fb93751a5edffed46a6c750a245b6efb84fdc4ab34dc010328">ripple::temMALFORMED</a></div><div class="ttdeci">@ temMALFORMED</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00082">TER.h:82</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_adba2cb9b84145dcb4b81daa3249d7d5b"><div class="ttname"><a href="namespaceripple.html#adba2cb9b84145dcb4b81daa3249d7d5b">ripple::featureCheckCashMakesTrustLine</a></div><div class="ttdeci">const uint256 featureCheckCashMakesTrustLine</div></div>
|
|
<div class="ttc" id="astructripple_1_1PreflightContext_html_af202c00e509cfbb1df4fe69f4d6d6560"><div class="ttname"><a href="structripple_1_1PreflightContext.html#af202c00e509cfbb1df4fe69f4d6d6560">ripple::PreflightContext::tx</a></div><div class="ttdeci">STTx const & tx</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00035">Transactor.h:35</a></div></div>
|
|
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
|
|
<div class="ttc" id="astructripple_1_1PreflightContext_html"><div class="ttname"><a href="structripple_1_1PreflightContext.html">ripple::PreflightContext</a></div><div class="ttdoc">State information when preflighting a tx.</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00031">Transactor.h:31</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STAmount_html_a84ebd351b1c12b5467b59c9cd4d1640f"><div class="ttname"><a href="classripple_1_1STAmount.html#a84ebd351b1c12b5467b59c9cd4d1640f">ripple::STAmount::cMaxOffset</a></div><div class="ttdeci">static const int cMaxOffset</div><div class="ttdef"><b>Definition:</b> <a href="STAmount_8h_source.html#l00063">STAmount.h:63</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aa298e929e02f59c2b05a30ee8805b38caf5820ac855eaa9dfcd635cd411019a31"><div class="ttname"><a href="namespaceripple.html#aa298e929e02f59c2b05a30ee8805b38caf5820ac855eaa9dfcd635cd411019a31">ripple::tecNO_AUTH</a></div><div class="ttdeci">@ tecNO_AUTH</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00264">TER.h:264</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_1_1keylet_html_a66624dcb8f66cb8548d032ff97030aa4"><div class="ttname"><a href="namespaceripple_1_1keylet.html#a66624dcb8f66cb8548d032ff97030aa4">ripple::keylet::check</a></div><div class="ttdeci">Keylet check(AccountID const &id, std::uint32_t seq) noexcept</div><div class="ttdoc">A Check.</div><div class="ttdef"><b>Definition:</b> <a href="Indexes_8cpp_source.html#l00281">Indexes.cpp:281</a></div></div>
|
|
<div class="ttc" id="astructripple_1_1PreflightContext_html_af305cba8e0b5dd06e61d2dc6ac74c1a8"><div class="ttname"><a href="structripple_1_1PreflightContext.html#af305cba8e0b5dd06e61d2dc6ac74c1a8">ripple::PreflightContext::rules</a></div><div class="ttdeci">const Rules rules</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00036">Transactor.h:36</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_ac8844b7ad1603892172e8e6d1044de00"><div class="ttname"><a href="namespaceripple.html#ac8844b7ad1603892172e8e6d1044de00">ripple::tfUniversalMask</a></div><div class="ttdeci">constexpr std::uint32_t tfUniversalMask</div><div class="ttdef"><b>Definition:</b> <a href="TxFlags_8h_source.html#l00060">TxFlags.h:60</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STAmount_html_a5c7b5375e72e2459d4b6d65797744ca6"><div class="ttname"><a href="classripple_1_1STAmount.html#a5c7b5375e72e2459d4b6d65797744ca6">ripple::STAmount::getCurrency</a></div><div class="ttdeci">Currency const & getCurrency() const</div><div class="ttdef"><b>Definition:</b> <a href="STAmount_8h_source.html#l00353">STAmount.h:353</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151"><div class="ttname"><a href="namespaceripple.html#aabc7f150d5082c73116a1cd5962b434da28c7d8b3ed759d363503a05fcd59f151">ripple::tesSUCCESS</a></div><div class="ttdeci">@ tesSUCCESS</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00219">TER.h:219</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1Transactor_html_a558a1d4288c859eb5875154a86435220"><div class="ttname"><a href="classripple_1_1Transactor.html#a558a1d4288c859eb5875154a86435220">ripple::Transactor::account_</a></div><div class="ttdeci">const AccountID account_</div><div class="ttdef"><b>Definition:</b> <a href="Transactor_8h_source.html#l00091">Transactor.h:91</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1CashCheck_html_a77617cbe4011c799e76bea864e96e193"><div class="ttname"><a href="classripple_1_1CashCheck.html#a77617cbe4011c799e76bea864e96e193">ripple::CashCheck::doApply</a></div><div class="ttdeci">TER doApply() override</div><div class="ttdef"><b>Definition:</b> <a href="CashCheck_8cpp_source.html#l00253">CashCheck.cpp:253</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a6cb89b79bc073abda42953c323d36cda"><div class="ttname"><a href="namespaceripple.html#a6cb89b79bc073abda42953c323d36cda">ripple::isFrozen</a></div><div class="ttdeci">bool isFrozen(ReadView const &view, AccountID const &account, Currency const &currency, AccountID const &issuer)</div><div class="ttdef"><b>Definition:</b> <a href="View_8cpp_source.html#l00200">View.cpp:200</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STObject_html_a8e207109e646759f4927d90e4404893f"><div class="ttname"><a href="classripple_1_1STObject.html#a8e207109e646759f4927d90e4404893f">ripple::STObject::getFieldAmount</a></div><div class="ttdeci">STAmount const & getFieldAmount(SField const &field) const</div><div class="ttdef"><b>Definition:</b> <a href="STObject_8cpp_source.html#l00603">STObject.cpp:603</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_a065cda95aed9cb1d66fb81cad0867ef6"><div class="ttname"><a href="namespaceripple.html#a065cda95aed9cb1d66fb81cad0867ef6">ripple::noAccount</a></div><div class="ttdeci">AccountID const & noAccount()</div><div class="ttdoc">A placeholder for empty accounts.</div><div class="ttdef"><b>Definition:</b> <a href="AccountID_8cpp_source.html#l00175">AccountID.cpp:175</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1ApplyContext_html_a8c8757b3b1f88baef47b31ed4e9682d0"><div class="ttname"><a href="classripple_1_1ApplyContext.html#a8c8757b3b1f88baef47b31ed4e9682d0">ripple::ApplyContext::tx</a></div><div class="ttdeci">STTx const & tx</div><div class="ttdef"><b>Definition:</b> <a href="ApplyContext_8h_source.html#l00048">ApplyContext.h:48</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1STAmount_html_af88c7b9a2ee49408f4fd17e1ee9f20df"><div class="ttname"><a href="classripple_1_1STAmount.html#af88c7b9a2ee49408f4fd17e1ee9f20df">ripple::STAmount::cMaxValue</a></div><div class="ttdeci">static const std::uint64_t cMaxValue</div><div class="ttdef"><b>Definition:</b> <a href="STAmount_8h_source.html#l00067">STAmount.h:67</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1XRPAmount_html"><div class="ttname"><a href="classripple_1_1XRPAmount.html">ripple::XRPAmount</a></div><div class="ttdef"><b>Definition:</b> <a href="XRPAmount_8h_source.html#l00046">XRPAmount.h:46</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html_af99ba2263d2a1e29207c40a35fc9f6b3"><div class="ttname"><a href="namespaceripple.html#af99ba2263d2a1e29207c40a35fc9f6b3">ripple::NotTEC</a></div><div class="ttdeci">TERSubset< CanCvtToNotTEC > NotTEC</div><div class="ttdef"><b>Definition:</b> <a href="TER_8h_source.html#l00525">TER.h:525</a></div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|