This commit is contained in:
bthomee
2025-03-11 18:21:06 +00:00
parent 95e4a9d650
commit 4ba075f689
2527 changed files with 275798 additions and 275583 deletions

View File

@@ -96,107 +96,106 @@ $(function() {
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">//==============================================================================</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &lt;test/jtx.h&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &lt;xrpld/app/misc/FeeVote.h&gt;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &lt;xrpl/basics/BasicConfig.h&gt;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">namespace </span>test {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1FeeVote__test.html"> 27</a></span><span class="keyword">class </span><a class="code hl_class" href="classripple_1_1test_1_1FeeVote__test.html">FeeVote_test</a> : <span class="keyword">public</span> <a class="code hl_class" href="classbeast_1_1unit__test_1_1suite.html">beast::unit_test::suite</a></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>{</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1FeeVote__test.html#a2b605bd9d60a4a7402bb45121429d8b1"> 30</a></span> <a class="code hl_function" href="classripple_1_1test_1_1FeeVote__test.html#a2b605bd9d60a4a7402bb45121429d8b1">testSetup</a>()</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> {</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <a class="code hl_struct" href="structripple_1_1FeeSetup.html">FeeSetup</a> <span class="keyword">const</span> defaultSetup;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// defaults</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> BEAST_EXPECT(setup.reference_fee == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">reference_fee</a>);</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> BEAST_EXPECT(setup.account_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a663fe50fc0e114c4e1d16524aa008a6c">account_reserve</a>);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> BEAST_EXPECT(setup.owner_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a4e137c8b9cd20b448515c830fcdd417c">owner_reserve</a>);</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> }</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> {</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> config.<a class="code hl_function" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> {<span class="stringliteral">&quot;reference_fee = 50&quot;</span>,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="stringliteral">&quot;account_reserve = 1234567&quot;</span>,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="stringliteral">&quot;owner_reserve = 1234&quot;</span>});</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> BEAST_EXPECT(setup.reference_fee == 50);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> BEAST_EXPECT(setup.account_reserve == 1234567);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> BEAST_EXPECT(setup.owner_reserve == 1234);</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> }</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> {</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> config.<a class="code hl_function" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> {<span class="stringliteral">&quot;reference_fee = blah&quot;</span>,</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="stringliteral">&quot;account_reserve = yada&quot;</span>,</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="stringliteral">&quot;owner_reserve = foo&quot;</span>});</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="comment">// Illegal values are ignored, and the defaults left unchanged</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> BEAST_EXPECT(setup.reference_fee == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">reference_fee</a>);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> BEAST_EXPECT(setup.account_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a663fe50fc0e114c4e1d16524aa008a6c">account_reserve</a>);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> BEAST_EXPECT(setup.owner_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a4e137c8b9cd20b448515c830fcdd417c">owner_reserve</a>);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> }</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> {</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> config.<a class="code hl_function" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> {<span class="stringliteral">&quot;reference_fee = -50&quot;</span>,</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="stringliteral">&quot;account_reserve = -1234567&quot;</span>,</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="stringliteral">&quot;owner_reserve = -1234&quot;</span>});</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="comment">// Illegal values are ignored, and the defaults left unchanged</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> BEAST_EXPECT(setup.reference_fee == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">reference_fee</a>);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> BEAST_EXPECT(</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> setup.account_reserve == <span class="keyword">static_cast&lt;</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a><span class="keyword">&gt;</span>(-1234567));</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> BEAST_EXPECT(</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> setup.owner_reserve == <span class="keyword">static_cast&lt;</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a><span class="keyword">&gt;</span>(-1234));</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> }</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> {</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keyword">const</span> <span class="keyword">auto</span> big64 = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">static_cast&lt;</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a><span class="keyword">&gt;</span>(</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/numeric_limits.html">std::numeric_limits&lt;XRPAmount::value_type&gt;::max</a>()) +</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> 1);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> config.<a class="code hl_function" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> {<span class="stringliteral">&quot;reference_fee = &quot;</span> + big64,</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="stringliteral">&quot;account_reserve = &quot;</span> + big64,</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="stringliteral">&quot;owner_reserve = &quot;</span> + big64});</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="comment">// Illegal values are ignored, and the defaults left unchanged</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> BEAST_EXPECT(setup.reference_fee == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">reference_fee</a>);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> BEAST_EXPECT(setup.account_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a663fe50fc0e114c4e1d16524aa008a6c">account_reserve</a>);</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> BEAST_EXPECT(setup.owner_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a4e137c8b9cd20b448515c830fcdd417c">owner_reserve</a>);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> }</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> }</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1FeeVote__test.html#ae1166539e8906c73c217b1edf1bff0e2"> 97</a></span> <a class="code hl_function" href="classripple_1_1test_1_1FeeVote__test.html#ae1166539e8906c73c217b1edf1bff0e2">run</a>()<span class="keyword"> override</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_function" href="classripple_1_1test_1_1FeeVote__test.html#a2b605bd9d60a4a7402bb45121429d8b1">testSetup</a>();</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> }</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>};</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"><a class="line" href="namespaceripple_1_1test.html#a339dff88ab005004d2313eb64c41c0f8"> 103</a></span>BEAST_DEFINE_TESTSUITE(<a class="code hl_class" href="classripple_1_1FeeVote.html">FeeVote</a>, server, <a class="code hl_namespace" href="namespaceripple.html">ripple</a>);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span>} <span class="comment">// namespace test</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span>} <span class="comment">// namespace ripple</span></div>
<div class="ttc" id="aclassbeast_1_1unit__test_1_1suite_html"><div class="ttname"><a href="classbeast_1_1unit__test_1_1suite.html">beast::unit_test::suite</a></div><div class="ttdoc">A testsuite class.</div><div class="ttdef"><b>Definition:</b> <a href="suite_8h_source.html#l00052">suite.h:53</a></div></div>
<div class="ttc" id="aclassripple_1_1FeeVote_html"><div class="ttname"><a href="classripple_1_1FeeVote.html">ripple::FeeVote</a></div><div class="ttdoc">Manager to process fee votes.</div><div class="ttdef"><b>Definition:</b> <a href="FeeVote_8h_source.html#l00032">FeeVote.h:33</a></div></div>
<div class="ttc" id="aclassripple_1_1Section_html"><div class="ttname"><a href="classripple_1_1Section.html">ripple::Section</a></div><div class="ttdoc">Holds a collection of configuration values.</div><div class="ttdef"><b>Definition:</b> <a href="BasicConfig_8h_source.html#l00045">BasicConfig.h:46</a></div></div>
<div class="ttc" id="aclassripple_1_1Section_html_aa94166c41decc5127022863dfee030b7"><div class="ttname"><a href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">ripple::Section::append</a></div><div class="ttdeci">void append(std::vector&lt; std::string &gt; const &amp;lines)</div><div class="ttdoc">Append a set of lines to this section.</div><div class="ttdef"><b>Definition:</b> <a href="BasicConfig_8cpp_source.html#l00038">BasicConfig.cpp:38</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1FeeVote__test_html"><div class="ttname"><a href="classripple_1_1test_1_1FeeVote__test.html">ripple::test::FeeVote_test</a></div><div class="ttdef"><b>Definition:</b> <a href="FeeVote__test_8cpp_source.html#l00027">FeeVote_test.cpp:28</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1FeeVote__test_html_a2b605bd9d60a4a7402bb45121429d8b1"><div class="ttname"><a href="classripple_1_1test_1_1FeeVote__test.html#a2b605bd9d60a4a7402bb45121429d8b1">ripple::test::FeeVote_test::testSetup</a></div><div class="ttdeci">void testSetup()</div><div class="ttdef"><b>Definition:</b> <a href="FeeVote__test_8cpp_source.html#l00030">FeeVote_test.cpp:30</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1FeeVote__test_html_ae1166539e8906c73c217b1edf1bff0e2"><div class="ttname"><a href="classripple_1_1test_1_1FeeVote__test.html#ae1166539e8906c73c217b1edf1bff0e2">ripple::test::FeeVote_test::run</a></div><div class="ttdeci">void run() override</div><div class="ttdoc">Runs the suite.</div><div class="ttdef"><b>Definition:</b> <a href="FeeVote__test_8cpp_source.html#l00097">FeeVote_test.cpp:97</a></div></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &lt;xrpl/basics/BasicConfig.h&gt;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">namespace </span>test {</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1FeeVote__test.html"> 26</a></span><span class="keyword">class </span><a class="code hl_class" href="classripple_1_1test_1_1FeeVote__test.html">FeeVote_test</a> : <span class="keyword">public</span> <a class="code hl_class" href="classbeast_1_1unit__test_1_1suite.html">beast::unit_test::suite</a></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>{</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1FeeVote__test.html#a2b605bd9d60a4a7402bb45121429d8b1"> 29</a></span> <a class="code hl_function" href="classripple_1_1test_1_1FeeVote__test.html#a2b605bd9d60a4a7402bb45121429d8b1">testSetup</a>()</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> {</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <a class="code hl_struct" href="structripple_1_1FeeSetup.html">FeeSetup</a> <span class="keyword">const</span> defaultSetup;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="comment">// defaults</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> BEAST_EXPECT(setup.reference_fee == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">reference_fee</a>);</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> BEAST_EXPECT(setup.account_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a663fe50fc0e114c4e1d16524aa008a6c">account_reserve</a>);</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> BEAST_EXPECT(setup.owner_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a4e137c8b9cd20b448515c830fcdd417c">owner_reserve</a>);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> }</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> {</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> config.<a class="code hl_function" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> {<span class="stringliteral">&quot;reference_fee = 50&quot;</span>,</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="stringliteral">&quot;account_reserve = 1234567&quot;</span>,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="stringliteral">&quot;owner_reserve = 1234&quot;</span>});</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> BEAST_EXPECT(setup.reference_fee == 50);</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> BEAST_EXPECT(setup.account_reserve == 1234567);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> BEAST_EXPECT(setup.owner_reserve == 1234);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> }</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> {</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> config.<a class="code hl_function" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> {<span class="stringliteral">&quot;reference_fee = blah&quot;</span>,</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="stringliteral">&quot;account_reserve = yada&quot;</span>,</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="stringliteral">&quot;owner_reserve = foo&quot;</span>});</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// Illegal values are ignored, and the defaults left unchanged</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> BEAST_EXPECT(setup.reference_fee == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">reference_fee</a>);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> BEAST_EXPECT(setup.account_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a663fe50fc0e114c4e1d16524aa008a6c">account_reserve</a>);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> BEAST_EXPECT(setup.owner_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a4e137c8b9cd20b448515c830fcdd417c">owner_reserve</a>);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> }</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> {</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> config.<a class="code hl_function" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> {<span class="stringliteral">&quot;reference_fee = -50&quot;</span>,</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="stringliteral">&quot;account_reserve = -1234567&quot;</span>,</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="stringliteral">&quot;owner_reserve = -1234&quot;</span>});</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="comment">// Illegal values are ignored, and the defaults left unchanged</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> BEAST_EXPECT(setup.reference_fee == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">reference_fee</a>);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> BEAST_EXPECT(</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> setup.account_reserve == <span class="keyword">static_cast&lt;</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a><span class="keyword">&gt;</span>(-1234567));</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> BEAST_EXPECT(</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> setup.owner_reserve == <span class="keyword">static_cast&lt;</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a><span class="keyword">&gt;</span>(-1234));</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> }</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> {</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keyword">const</span> <span class="keyword">auto</span> big64 = <a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keyword">static_cast&lt;</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a><span class="keyword">&gt;</span>(</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/numeric_limits.html">std::numeric_limits&lt;XRPAmount::value_type&gt;::max</a>()) +</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> 1);</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <a class="code hl_class" href="classripple_1_1Section.html">Section</a> config;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> config.<a class="code hl_function" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> {<span class="stringliteral">&quot;reference_fee = &quot;</span> + big64,</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="stringliteral">&quot;account_reserve = &quot;</span> + big64,</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="stringliteral">&quot;owner_reserve = &quot;</span> + big64});</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="comment">// Illegal values are ignored, and the defaults left unchanged</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keyword">auto</span> setup = <a class="code hl_function" href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">setup_FeeVote</a>(config);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> BEAST_EXPECT(setup.reference_fee == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">reference_fee</a>);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> BEAST_EXPECT(setup.account_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a663fe50fc0e114c4e1d16524aa008a6c">account_reserve</a>);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> BEAST_EXPECT(setup.owner_reserve == defaultSetup.<a class="code hl_variable" href="structripple_1_1FeeSetup.html#a4e137c8b9cd20b448515c830fcdd417c">owner_reserve</a>);</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> }</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">void</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1FeeVote__test.html#ae1166539e8906c73c217b1edf1bff0e2"> 96</a></span> <a class="code hl_function" href="classripple_1_1test_1_1FeeVote__test.html#ae1166539e8906c73c217b1edf1bff0e2">run</a>()<span class="keyword"> override</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_function" href="classripple_1_1test_1_1FeeVote__test.html#a2b605bd9d60a4a7402bb45121429d8b1">testSetup</a>();</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> }</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span>};</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="namespaceripple_1_1test.html#a339dff88ab005004d2313eb64c41c0f8"> 102</a></span>BEAST_DEFINE_TESTSUITE(<a class="code hl_class" href="classripple_1_1FeeVote.html">FeeVote</a>, server, <a class="code hl_namespace" href="namespaceripple.html">ripple</a>);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span>} <span class="comment">// namespace test</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span>} <span class="comment">// namespace ripple</span></div>
<div class="ttc" id="aclassbeast_1_1unit__test_1_1suite_html"><div class="ttname"><a href="classbeast_1_1unit__test_1_1suite.html">beast::unit_test::suite</a></div><div class="ttdoc">A testsuite class.</div><div class="ttdef"><b>Definition:</b> <a href="suite_8h_source.html#l00054">suite.h:55</a></div></div>
<div class="ttc" id="aclassripple_1_1FeeVote_html"><div class="ttname"><a href="classripple_1_1FeeVote.html">ripple::FeeVote</a></div><div class="ttdoc">Manager to process fee votes.</div><div class="ttdef"><b>Definition:</b> <a href="FeeVote_8h_source.html#l00030">FeeVote.h:31</a></div></div>
<div class="ttc" id="aclassripple_1_1Section_html"><div class="ttname"><a href="classripple_1_1Section.html">ripple::Section</a></div><div class="ttdoc">Holds a collection of configuration values.</div><div class="ttdef"><b>Definition:</b> <a href="BasicConfig_8h_source.html#l00044">BasicConfig.h:45</a></div></div>
<div class="ttc" id="aclassripple_1_1Section_html_aa94166c41decc5127022863dfee030b7"><div class="ttname"><a href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">ripple::Section::append</a></div><div class="ttdeci">void append(std::vector&lt; std::string &gt; const &amp;lines)</div><div class="ttdoc">Append a set of lines to this section.</div><div class="ttdef"><b>Definition:</b> <a href="BasicConfig_8cpp_source.html#l00047">BasicConfig.cpp:47</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1FeeVote__test_html"><div class="ttname"><a href="classripple_1_1test_1_1FeeVote__test.html">ripple::test::FeeVote_test</a></div><div class="ttdef"><b>Definition:</b> <a href="FeeVote__test_8cpp_source.html#l00026">FeeVote_test.cpp:27</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1FeeVote__test_html_a2b605bd9d60a4a7402bb45121429d8b1"><div class="ttname"><a href="classripple_1_1test_1_1FeeVote__test.html#a2b605bd9d60a4a7402bb45121429d8b1">ripple::test::FeeVote_test::testSetup</a></div><div class="ttdeci">void testSetup()</div><div class="ttdef"><b>Definition:</b> <a href="FeeVote__test_8cpp_source.html#l00029">FeeVote_test.cpp:29</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1FeeVote__test_html_ae1166539e8906c73c217b1edf1bff0e2"><div class="ttname"><a href="classripple_1_1test_1_1FeeVote__test.html#ae1166539e8906c73c217b1edf1bff0e2">ripple::test::FeeVote_test::run</a></div><div class="ttdeci">void run() override</div><div class="ttdoc">Runs the suite.</div><div class="ttdef"><b>Definition:</b> <a href="FeeVote__test_8cpp_source.html#l00096">FeeVote_test.cpp:96</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"><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="algorithm_8h_source.html#l00026">algorithm.h:26</a></div></div>
<div class="ttc" id="anamespaceripple_html_ac297eefd69dc2e30749d2446715b3f9c"><div class="ttname"><a href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">ripple::setup_FeeVote</a></div><div class="ttdeci">FeeSetup setup_FeeVote(Section const &amp;section)</div><div class="ttdef"><b>Definition:</b> <a href="Config_8cpp_source.html#l01090">Config.cpp:1090</a></div></div>
<div class="ttc" id="anamespaceripple_html_ac297eefd69dc2e30749d2446715b3f9c"><div class="ttname"><a href="namespaceripple.html#ac297eefd69dc2e30749d2446715b3f9c">ripple::setup_FeeVote</a></div><div class="ttdeci">FeeSetup setup_FeeVote(Section const &amp;section)</div><div class="ttdef"><b>Definition:</b> <a href="Config_8cpp_source.html#l01091">Config.cpp:1091</a></div></div>
<div class="ttc" id="anumeric_limits_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/numeric_limits.html">std::numeric_limits</a></div></div>
<div class="ttc" id="astructripple_1_1FeeSetup_html"><div class="ttname"><a href="structripple_1_1FeeSetup.html">ripple::FeeSetup</a></div><div class="ttdoc">Fee schedule for startup / standalone, and to vote for.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00072">Config.h:73</a></div></div>
<div class="ttc" id="astructripple_1_1FeeSetup_html_a0eec4da1884d29e364b4475f57f1453d"><div class="ttname"><a href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">ripple::FeeSetup::reference_fee</a></div><div class="ttdeci">XRPAmount reference_fee</div><div class="ttdoc">The cost of a reference transaction in drops.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00075">Config.h:75</a></div></div>
<div class="ttc" id="astructripple_1_1FeeSetup_html_a4e137c8b9cd20b448515c830fcdd417c"><div class="ttname"><a href="structripple_1_1FeeSetup.html#a4e137c8b9cd20b448515c830fcdd417c">ripple::FeeSetup::owner_reserve</a></div><div class="ttdeci">XRPAmount owner_reserve</div><div class="ttdoc">The per-owned item reserve requirement in drops.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00081">Config.h:81</a></div></div>
<div class="ttc" id="astructripple_1_1FeeSetup_html_a663fe50fc0e114c4e1d16524aa008a6c"><div class="ttname"><a href="structripple_1_1FeeSetup.html#a663fe50fc0e114c4e1d16524aa008a6c">ripple::FeeSetup::account_reserve</a></div><div class="ttdeci">XRPAmount account_reserve</div><div class="ttdoc">The account reserve requirement in drops.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00078">Config.h:78</a></div></div>
<div class="ttc" id="astructripple_1_1FeeSetup_html"><div class="ttname"><a href="structripple_1_1FeeSetup.html">ripple::FeeSetup</a></div><div class="ttdoc">Fee schedule for startup / standalone, and to vote for.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00065">Config.h:66</a></div></div>
<div class="ttc" id="astructripple_1_1FeeSetup_html_a0eec4da1884d29e364b4475f57f1453d"><div class="ttname"><a href="structripple_1_1FeeSetup.html#a0eec4da1884d29e364b4475f57f1453d">ripple::FeeSetup::reference_fee</a></div><div class="ttdeci">XRPAmount reference_fee</div><div class="ttdoc">The cost of a reference transaction in drops.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00068">Config.h:68</a></div></div>
<div class="ttc" id="astructripple_1_1FeeSetup_html_a4e137c8b9cd20b448515c830fcdd417c"><div class="ttname"><a href="structripple_1_1FeeSetup.html#a4e137c8b9cd20b448515c830fcdd417c">ripple::FeeSetup::owner_reserve</a></div><div class="ttdeci">XRPAmount owner_reserve</div><div class="ttdoc">The per-owned item reserve requirement in drops.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00074">Config.h:74</a></div></div>
<div class="ttc" id="astructripple_1_1FeeSetup_html_a663fe50fc0e114c4e1d16524aa008a6c"><div class="ttname"><a href="structripple_1_1FeeSetup.html#a663fe50fc0e114c4e1d16524aa008a6c">ripple::FeeSetup::account_reserve</a></div><div class="ttdeci">XRPAmount account_reserve</div><div class="ttdoc">The account reserve requirement in drops.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00071">Config.h:71</a></div></div>
<div class="ttc" id="ato_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a></div><div class="ttdeci">T to_string(T... args)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->