mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 03:55:53 +00:00
deploy: 97712107b7
This commit is contained in:
@@ -96,382 +96,382 @@ $(function() {
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <ripple/core/ConfigSections.h></span></div>
|
||||
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <ripple/protocol/Feature.h></span></div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <ripple/protocol/PublicKey.h></span></div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <ripple/protocol/SecretKey.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> <span class="preprocessor">#include <ripple/protocol/digest.h></span></div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <test/unit_test/SuiteJournal.h></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"><a class="line" href="classripple_1_1AmendmentTable__test.html"> 35</a></span> <span class="keyword">class </span><a class="code" href="classripple_1_1AmendmentTable__test.html">AmendmentTable_test</a> final : <span class="keyword">public</span> beast::unit_test::suite</div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="comment">// 204/256 about 80% (we round down because the implementation rounds up)</span></div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a8d1ae28ade4149f3b3ed62ecbdeb0669"> 39</a></span>  <span class="keyword">static</span> <span class="keywordtype">int</span> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a8d1ae28ade4149f3b3ed62ecbdeb0669">majorityFraction</a>{204};</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>  <span class="keyword">static</span> <a class="code" href="classripple_1_1base__uint.html">uint256</a></div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a"> 42</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> in)</div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  {</div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <a class="code" href="structripple_1_1openssl__sha256__hasher.html">sha256_hasher</a> h;</div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">using</span> <a class="code" href="namespacebeast.html#a4a9eebb8b68941c49b07763d7a95d456">beast::hash_append</a>;</div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="namespaceripple.html#a06da0e52773c5c0841994317a3d5e3d0">hash_append</a>(h, <a class="code" href="namespaceripple.html#a7cc64e12723fbc9606d85442a2569feda13b5bfe96f3e2fe411c9f66f4a582adf">in</a>);</div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">auto</span> <span class="keyword">const</span> d = <span class="keyword">static_cast<</span><a class="codeRef" href="http://en.cppreference.com/w/cpp/container/array.html">sha256_hasher::result_type</a><span class="keyword">></span>(h);</div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> result;</div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/byte/memcpy.html">std::memcpy</a>(result.<a class="code" href="classripple_1_1base__uint.html#a5342507fe2fb5ac55d578e7e98863f70">data</a>(), d.data(), d.size());</div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">return</span> result;</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>  </div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a></div>
|
||||
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0"> 54</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(<span class="keywordtype">int</span> group, <span class="keywordtype">int</span> count)</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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> amendments;</div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < count; i++)</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  amendments.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(</div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="stringliteral">"Amendment"</span> + <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>((1000000 * group) + i));</div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">return</span> amendments;</div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  }</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>  <span class="keyword">static</span> <a class="code" href="classripple_1_1Section.html">Section</a></div>
|
||||
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d"> 64</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span>& amendments)</div>
|
||||
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {</div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <a class="code" href="classripple_1_1Section.html">Section</a> section(<span class="stringliteral">"Test"</span>);</div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : amendments)</div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  section.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)) + <span class="stringliteral">" "</span> + a);</div>
|
||||
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">return</span> section;</div>
|
||||
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  }</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>  <span class="keyword">static</span> <a class="code" href="classripple_1_1Section.html">Section</a></div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#ad7b462323ac411e0777de5afb69e5229"> 73</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#ad7b462323ac411e0777de5afb69e5229">makeSection</a>(<a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>& amendment)</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>  <a class="code" href="classripple_1_1Section.html">Section</a> section(<span class="stringliteral">"Test"</span>);</div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  section.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(amendment) + <span class="stringliteral">" "</span> + <a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(amendment));</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">return</span> section;</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>  </div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3"> 80</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>;</div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994"> 81</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>;</div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470"> 82</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>;</div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d"> 83</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>;</div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39"> 84</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>;</div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  </div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd"> 86</a></span>  <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>;</div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  </div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444"> 88</a></span>  <a class="code" href="classripple_1_1test_1_1SuiteJournal.html">test::SuiteJournal</a> <a class="code" href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444">journal</a>;</div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  </div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a5c3e6df34f12225704a4e082566ad04d"> 91</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a5c3e6df34f12225704a4e082566ad04d">AmendmentTable_test</a>()</div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  : <a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(1, 12))</div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(2, 12))</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(3, 12))</div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(4, 12))</div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(5, 12))</div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444">journal</a>(<span class="stringliteral">"AmendmentTable_test"</span>, *this)</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>  }</div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  </div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr<AmendmentTable></a></div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b"> 102</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(</div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordtype">int</span> w,</div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span> supported,</div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span> enabled,</div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span> vetoed)</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="keywordflow">return</span> <a class="code" href="namespaceripple.html#ac19cff417e1091f50fc523c5a1755d62">make_AmendmentTable</a>(</div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="namespaceripple.html#a6eab3a5ee85e00078b47947e27e59535">weeks</a>(w), <a class="code" href="classripple_1_1AmendmentTable__test.html#a8d1ae28ade4149f3b3ed62ecbdeb0669">majorityFraction</a>, supported, enabled, vetoed, <a class="code" href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444">journal</a>);</div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr<AmendmentTable></a></div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a57fa5cbb587e254813d53765a39765e4"> 113</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a57fa5cbb587e254813d53765a39765e4">makeTable</a>(<span class="keywordtype">int</span> w)</div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  {</div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">return</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(</div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  w, <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>), <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>), <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>));</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>  </div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a0da93197ddc8b1ca29e80e9a4adffbc7"> 120</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a0da93197ddc8b1ca29e80e9a4adffbc7">testConstruct</a>()</div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  {</div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  testcase(<span class="stringliteral">"Construction"</span>);</div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  </div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keyword">auto</span> table = <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(1);</div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  </div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>)</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>  BEAST_EXPECT(table->isSupported(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  BEAST_EXPECT(!table->isEnabled(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(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>  </div>
|
||||
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</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>  BEAST_EXPECT(table->isSupported(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  BEAST_EXPECT(table->isEnabled(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  }</div>
|
||||
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  </div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>)</div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  {</div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  BEAST_EXPECT(!table->isSupported(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  BEAST_EXPECT(!table->isEnabled(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(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>  }</div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  </div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#aade47bfc870e1055e6a8ab4c6551a990"> 146</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#aade47bfc870e1055e6a8ab4c6551a990">testGet</a>()</div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  {</div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  testcase(<span class="stringliteral">"Name to ID mapping"</span>);</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>  <span class="keyword">auto</span> table = <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(1);</div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  </div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>)</div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  BEAST_EXPECT(table->find(a) == <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a));</div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>)</div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  BEAST_EXPECT(table->find(a) == <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a));</div>
|
||||
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  </div>
|
||||
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>)</div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  BEAST_EXPECT(!table->find(a));</div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>)</div>
|
||||
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  BEAST_EXPECT(!table->find(a));</div>
|
||||
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>)</div>
|
||||
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  BEAST_EXPECT(!table->find(a));</div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</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>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#ae16e2917296fdfba2a7a41982e2cf286"> 166</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#ae16e2917296fdfba2a7a41982e2cf286">testBadConfig</a>()</div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  {</div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keyword">auto</span> <span class="keyword">const</span> section = <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>);</div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keyword">auto</span> <span class="keyword">const</span> <span class="keywordtype">id</span> = <a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>[0]));</div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  </div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  testcase(<span class="stringliteral">"Bad Config"</span>);</div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  </div>
|
||||
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  { <span class="comment">// Two arguments are required - we pass one</span></div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(<span class="keywordtype">id</span>);</div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  </div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">try</span></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> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  fail(<span class="stringliteral">"Accepted only amendment ID"</span>);</div>
|
||||
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  }</div>
|
||||
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">catch</span> (...)</div>
|
||||
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  {</div>
|
||||
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  pass();</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>  </div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  { <span class="comment">// Two arguments are required - we pass three</span></div>
|
||||
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(<span class="keywordtype">id</span> + <span class="stringliteral">" Test Name"</span>);</div>
|
||||
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  </div>
|
||||
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordflow">try</span></div>
|
||||
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  {</div>
|
||||
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  fail(<span class="stringliteral">"Accepted extra arguments"</span>);</div>
|
||||
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div>
|
||||
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordflow">catch</span> (...)</div>
|
||||
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  {</div>
|
||||
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  pass();</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>  }</div>
|
||||
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  </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>  <span class="keyword">auto</span> sid = id;</div>
|
||||
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  sid.resize(sid.length() - 1);</div>
|
||||
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  </div>
|
||||
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(sid + <span class="stringliteral">" Name"</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">try</span></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> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  fail(<span class="stringliteral">"Accepted short amendment ID"</span>);</div>
|
||||
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  }</div>
|
||||
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="keywordflow">catch</span> (...)</div>
|
||||
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  {</div>
|
||||
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  pass();</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>  }</div>
|
||||
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  </div>
|
||||
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  {</div>
|
||||
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keyword">auto</span> sid = id;</div>
|
||||
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  sid.resize(sid.length() + 1, <span class="charliteral">'0'</span>);</div>
|
||||
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  </div>
|
||||
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(sid + <span class="stringliteral">" Name"</span>);</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">try</span></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>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  fail(<span class="stringliteral">"Accepted long amendment ID"</span>);</div>
|
||||
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  }</div>
|
||||
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="keywordflow">catch</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>  pass();</div>
|
||||
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  }</div>
|
||||
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  }</div>
|
||||
<div class="line"><a name="l00238"></a><span class="lineno"> 238</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="keyword">auto</span> sid = id;</div>
|
||||
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  sid.resize(sid.length() - 1);</div>
|
||||
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  sid.push_back(<span class="charliteral">'Q'</span>);</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>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(sid + <span class="stringliteral">" Name"</span>);</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>  <span class="keywordflow">try</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">if</span> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  fail(<span class="stringliteral">"Accepted non-hex amendment ID"</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>  <span class="keywordflow">catch</span> (...)</div>
|
||||
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  {</div>
|
||||
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  pass();</div>
|
||||
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  }</div>
|
||||
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  }</div>
|
||||
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  }</div>
|
||||
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  </div>
|
||||
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/map.html">std::map<uint256, bool></a></div>
|
||||
<div class="line"><a name="l00260"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4"> 260</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4">getState</a>(<a class="code" href="classripple_1_1AmendmentTable.html">AmendmentTable</a>* table, <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<uint256></a> <span class="keyword">const</span>& exclude)</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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/map.html">std::map<uint256, bool></a> state;</div>
|
||||
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  </div>
|
||||
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <span class="keyword">auto</span> track = [&state, table](<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span>& v) {</div>
|
||||
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : v)</div>
|
||||
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  {</div>
|
||||
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keyword">auto</span> <span class="keyword">const</span> <span class="keywordtype">id</span> = <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a);</div>
|
||||
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  state[id] = table-><a class="code" href="classripple_1_1AmendmentTable.html#a190291d07831f18a0ce7847000c24f17">isEnabled</a>(<span class="keywordtype">id</span>);</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>  };</div>
|
||||
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  </div>
|
||||
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>);</div>
|
||||
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>);</div>
|
||||
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>);</div>
|
||||
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>);</div>
|
||||
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>);</div>
|
||||
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  </div>
|
||||
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : exclude)</div>
|
||||
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  state.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/map/erase.html">erase</a>(a);</div>
|
||||
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  </div>
|
||||
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordflow">return</span> state;</div>
|
||||
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  }</div>
|
||||
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  </div>
|
||||
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00285"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a6a398f00d47d59c5cd380f399201cf7a"> 285</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a6a398f00d47d59c5cd380f399201cf7a">testEnableDisable</a>()</div>
|
||||
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  {</div>
|
||||
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  testcase(<span class="stringliteral">"enable & disable"</span>);</div>
|
||||
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  </div>
|
||||
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="keyword">auto</span> <span class="keyword">const</span> testAmendment = <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<span class="stringliteral">"TestAmendment"</span>);</div>
|
||||
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keyword">auto</span> table = <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2);</div>
|
||||
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  </div>
|
||||
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="comment">// Subset of amendments to enable</span></div>
|
||||
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<uint256></a> enabled;</div>
|
||||
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(testAmendment);</div>
|
||||
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>[0]));</div>
|
||||
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>[0]));</div>
|
||||
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>[0]));</div>
|
||||
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>[0]));</div>
|
||||
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>[0]));</div>
|
||||
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  </div>
|
||||
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="comment">// Get the state before, excluding the items we'll change:</span></div>
|
||||
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="keyword">auto</span> <span class="keyword">const</span> pre_state = <a class="code" href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4">getState</a>(table.get(), enabled);</div>
|
||||
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  </div>
|
||||
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="comment">// Enable the subset and verify</span></div>
|
||||
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : enabled)</div>
|
||||
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  table->enable(a);</div>
|
||||
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  </div>
|
||||
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : enabled)</div>
|
||||
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  BEAST_EXPECT(table->isEnabled(a));</div>
|
||||
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  </div>
|
||||
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="comment">// Disable the subset and verify</span></div>
|
||||
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : enabled)</div>
|
||||
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  table->disable(a);</div>
|
||||
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  </div>
|
||||
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : enabled)</div>
|
||||
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  BEAST_EXPECT(!table->isEnabled(a));</div>
|
||||
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  </div>
|
||||
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  <span class="comment">// Get the state after, excluding the items we changed:</span></div>
|
||||
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <span class="keyword">auto</span> <span class="keyword">const</span> post_state = <a class="code" href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4">getState</a>(table.get(), enabled);</div>
|
||||
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  </div>
|
||||
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  <span class="comment">// Ensure the states are identical</span></div>
|
||||
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keyword">auto</span> ret = <a class="codeRef" href="http://en.cppreference.com/w/cpp/algorithm/mismatch.html">std::mismatch</a>(</div>
|
||||
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  pre_state.begin(),</div>
|
||||
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  pre_state.end(),</div>
|
||||
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  post_state.begin(),</div>
|
||||
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  post_state.end());</div>
|
||||
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  </div>
|
||||
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  BEAST_EXPECT(ret.first == pre_state.end());</div>
|
||||
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  BEAST_EXPECT(ret.second == post_state.end());</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>  </div>
|
||||
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::pair<PublicKey, SecretKey></a>></div>
|
||||
<div class="line"><a name="l00333"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a155b9c97cff557ee78d0860071e0e1cf"> 333</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a155b9c97cff557ee78d0860071e0e1cf">makeValidators</a>(<span class="keywordtype">int</span> num)</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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::pair<PublicKey, SecretKey></a>> ret;</div>
|
||||
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  ret.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(num);</div>
|
||||
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < num; ++i)</div>
|
||||
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  {</div>
|
||||
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  ret.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(<a class="code" href="namespaceripple.html#ac52a0a522fc11bdd47fce39bd29f97bc">randomKeyPair</a>(<a class="code" href="namespaceripple.html#a9de744cfdefe1132969eb982e57e4ddea82c2b7829b8129e5a2d53665ba4b4757">KeyType::secp256k1</a>));</div>
|
||||
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  }</div>
|
||||
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="keywordflow">return</span> ret;</div>
|
||||
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  }</div>
|
||||
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  </div>
|
||||
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/time_point.html">NetClock::time_point</a></div>
|
||||
<div class="line"><a name="l00345"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#ab7e9b79a9bc679d4fe6e523f6c5af544"> 345</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#ab7e9b79a9bc679d4fe6e523f6c5af544">weekTime</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">weeks</a> w)</div>
|
||||
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  {</div>
|
||||
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <span class="keywordflow">return</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/time_point.html">NetClock::time_point</a>{w};</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>  </div>
|
||||
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="comment">// Execute a pretend consensus round for a flag ledger</span></div>
|
||||
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00352"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#ab7bc1653c034aa3a5fa820f9d090a8e9"> 352</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#ab7bc1653c034aa3a5fa820f9d090a8e9">doRound</a>(</div>
|
||||
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <a class="code" href="classripple_1_1AmendmentTable.html">AmendmentTable</a>& table,</div>
|
||||
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">weeks</a> week,</div>
|
||||
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair<PublicKey, SecretKey></a>> <span class="keyword">const</span>& validators,</div>
|
||||
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair<uint256, int></a>> <span class="keyword">const</span>& votes,</div>
|
||||
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<uint256></a>& ourVotes,</div>
|
||||
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<uint256></a>& enabled,</div>
|
||||
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/map.html">majorityAmendments_t</a>& majority)</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">// Do a round at the specified time</span></div>
|
||||
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="comment">// Returns the amendments we voted for</span></div>
|
||||
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  </div>
|
||||
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  <span class="comment">// Parameters:</span></div>
|
||||
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="comment">// table: Our table of known and vetoed amendments</span></div>
|
||||
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  <span class="comment">// validators: The addreses of validators we trust</span></div>
|
||||
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <span class="comment">// votes: Amendments and the number of validators who vote for them</span></div>
|
||||
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="comment">// ourVotes: The amendments we vote for in our validation</span></div>
|
||||
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="comment">// enabled: In/out enabled amendments</span></div>
|
||||
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="comment">// majority: In/our majority amendments (and when they got a majority)</span></div>
|
||||
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  </div>
|
||||
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <span class="keyword">auto</span> <span class="keyword">const</span> roundTime = <a class="code" href="classripple_1_1AmendmentTable__test.html#ab7e9b79a9bc679d4fe6e523f6c5af544">weekTime</a>(week);</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>  <span class="comment">// Build validations</span></div>
|
||||
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<STValidation::pointer></a> validations;</div>
|
||||
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  validations.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(validators.size());</div>
|
||||
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  </div>
|
||||
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& val : validators)</div>
|
||||
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  {</div>
|
||||
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  ++i;</div>
|
||||
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<uint256></a> field;</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="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& amendment : votes)</div>
|
||||
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  {</div>
|
||||
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <span class="keywordflow">if</span> ((256 * i) < (validators.size() * amendment.second))</div>
|
||||
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  {</div>
|
||||
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="comment">// We vote yes on this amendment</span></div>
|
||||
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  field.push_back(amendment.first);</div>
|
||||
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  }</div>
|
||||
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  }</div>
|
||||
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  </div>
|
||||
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  <span class="keyword">auto</span> v = std::make_shared<STValidation>(</div>
|
||||
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <a class="code" href="namespaceripple.html#a356c68147333a9a48a344718038576d9">uint256</a>(),</div>
|
||||
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  i,</div>
|
||||
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <a class="code" href="namespaceripple.html#a356c68147333a9a48a344718038576d9">uint256</a>(),</div>
|
||||
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  roundTime,</div>
|
||||
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  val.first,</div>
|
||||
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  val.second,</div>
|
||||
<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  <a class="code" href="namespaceripple.html#a984ddd646f1e1a5032a9a17f96c6fc55">calcNodeID</a>(val.first),</div>
|
||||
<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <span class="keyword">true</span>,</div>
|
||||
<div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <a class="code" href="structripple_1_1STValidation_1_1FeeSettings.html">STValidation::FeeSettings</a>{},</div>
|
||||
<div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  field);</div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <ripple/protocol/STValidation.h></span></div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <ripple/protocol/SecretKey.h></span></div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <ripple/protocol/TxFlags.h></span></div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <ripple/protocol/digest.h></span></div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include <test/unit_test/SuiteJournal.h></span></div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  </div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html"> 36</a></span> <span class="keyword">class </span><a class="code" href="classripple_1_1AmendmentTable__test.html">AmendmentTable_test</a> final : <span class="keyword">public</span> beast::unit_test::suite</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="keyword">private</span>:</div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="comment">// 204/256 about 80% (we round down because the implementation rounds up)</span></div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a8d1ae28ade4149f3b3ed62ecbdeb0669"> 40</a></span>  <span class="keyword">static</span> <span class="keywordtype">int</span> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a8d1ae28ade4149f3b3ed62ecbdeb0669">majorityFraction</a>{204};</div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  </div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keyword">static</span> <a class="code" href="classripple_1_1base__uint.html">uint256</a></div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a"> 43</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> in)</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>  <a class="code" href="structripple_1_1openssl__sha256__hasher.html">sha256_hasher</a> h;</div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">using</span> <a class="code" href="namespacebeast.html#a4a9eebb8b68941c49b07763d7a95d456">beast::hash_append</a>;</div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="code" href="namespaceripple.html#a06da0e52773c5c0841994317a3d5e3d0">hash_append</a>(h, <a class="code" href="namespaceripple.html#a7cc64e12723fbc9606d85442a2569feda13b5bfe96f3e2fe411c9f66f4a582adf">in</a>);</div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keyword">auto</span> <span class="keyword">const</span> d = <span class="keyword">static_cast<</span><a class="codeRef" href="http://en.cppreference.com/w/cpp/container/array.html">sha256_hasher::result_type</a><span class="keyword">></span>(h);</div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="classripple_1_1base__uint.html">uint256</a> result;</div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/byte/memcpy.html">std::memcpy</a>(result.<a class="code" href="classripple_1_1base__uint.html#a5342507fe2fb5ac55d578e7e98863f70">data</a>(), d.data(), d.size());</div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  }</div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  </div>
|
||||
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a></div>
|
||||
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0"> 55</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(<span class="keywordtype">int</span> group, <span class="keywordtype">int</span> count)</div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  {</div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> amendments;</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < count; i++)</div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  amendments.push_back(</div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="stringliteral">"Amendment"</span> + <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>((1000000 * group) + i));</div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">return</span> amendments;</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="keyword">static</span> <a class="code" href="classripple_1_1Section.html">Section</a></div>
|
||||
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d"> 65</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span>& amendments)</div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  {</div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <a class="code" href="classripple_1_1Section.html">Section</a> section(<span class="stringliteral">"Test"</span>);</div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : amendments)</div>
|
||||
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  section.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)) + <span class="stringliteral">" "</span> + a);</div>
|
||||
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span> section;</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="keyword">static</span> <a class="code" href="classripple_1_1Section.html">Section</a></div>
|
||||
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#ad7b462323ac411e0777de5afb69e5229"> 74</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#ad7b462323ac411e0777de5afb69e5229">makeSection</a>(<a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>& amendment)</div>
|
||||
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  {</div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="code" href="classripple_1_1Section.html">Section</a> section(<span class="stringliteral">"Test"</span>);</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  section.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(<a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(amendment) + <span class="stringliteral">" "</span> + <a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(amendment));</div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">return</span> section;</div>
|
||||
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  }</div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  </div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3"> 81</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>;</div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994"> 82</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>;</div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470"> 83</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>;</div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d"> 84</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>;</div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39"> 85</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>;</div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  </div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd"> 87</a></span>  <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>;</div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  </div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444"> 89</a></span>  <a class="code" href="classripple_1_1test_1_1SuiteJournal.html">test::SuiteJournal</a> <a class="code" href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444">journal</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> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a5c3e6df34f12225704a4e082566ad04d"> 92</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a5c3e6df34f12225704a4e082566ad04d">AmendmentTable_test</a>()</div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  : <a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(1, 12))</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(2, 12))</div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(3, 12))</div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(4, 12))</div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">createSet</a>(5, 12))</div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  , <a class="code" href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444">journal</a>(<span class="stringliteral">"AmendmentTable_test"</span>, *this)</div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  {</div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  }</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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr<AmendmentTable></a></div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b"> 103</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(</div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordtype">int</span> w,</div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span> supported,</div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span> enabled,</div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span> vetoed)</div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {</div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceripple.html#ac19cff417e1091f50fc523c5a1755d62">make_AmendmentTable</a>(</div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <a class="code" href="namespaceripple.html#a6eab3a5ee85e00078b47947e27e59535">weeks</a>(w), <a class="code" href="classripple_1_1AmendmentTable__test.html#a8d1ae28ade4149f3b3ed62ecbdeb0669">majorityFraction</a>, supported, enabled, vetoed, <a class="code" href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444">journal</a>);</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>  </div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr<AmendmentTable></a></div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a57fa5cbb587e254813d53765a39765e4"> 114</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a57fa5cbb587e254813d53765a39765e4">makeTable</a>(<span class="keywordtype">int</span> w)</div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  {</div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">return</span> <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(</div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  w, <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>), <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>), <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>));</div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  }</div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  </div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a0da93197ddc8b1ca29e80e9a4adffbc7"> 121</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a0da93197ddc8b1ca29e80e9a4adffbc7">testConstruct</a>()</div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  {</div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  testcase(<span class="stringliteral">"Construction"</span>);</div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  </div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keyword">auto</span> table = <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(1);</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>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>)</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>  BEAST_EXPECT(table->isSupported(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  BEAST_EXPECT(!table->isEnabled(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  }</div>
|
||||
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  </div>
|
||||
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>)</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>  BEAST_EXPECT(table->isSupported(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  BEAST_EXPECT(table->isEnabled(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  }</div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  </div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>)</div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  {</div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  BEAST_EXPECT(!table->isSupported(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  BEAST_EXPECT(!table->isEnabled(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a)));</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  }</div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  }</div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  </div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#aade47bfc870e1055e6a8ab4c6551a990"> 147</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#aade47bfc870e1055e6a8ab4c6551a990">testGet</a>()</div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  {</div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  testcase(<span class="stringliteral">"Name to ID mapping"</span>);</div>
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  </div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keyword">auto</span> table = <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(1);</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>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>)</div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  BEAST_EXPECT(table->find(a) == <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a));</div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>)</div>
|
||||
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  BEAST_EXPECT(table->find(a) == <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a));</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>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>)</div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  BEAST_EXPECT(!table->find(a));</div>
|
||||
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>)</div>
|
||||
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  BEAST_EXPECT(!table->find(a));</div>
|
||||
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : <a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>)</div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  BEAST_EXPECT(!table->find(a));</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>  </div>
|
||||
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#ae16e2917296fdfba2a7a41982e2cf286"> 167</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#ae16e2917296fdfba2a7a41982e2cf286">testBadConfig</a>()</div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  {</div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keyword">auto</span> <span class="keyword">const</span> section = <a class="code" href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">makeSection</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>);</div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keyword">auto</span> <span class="keyword">const</span> <span class="keywordtype">id</span> = <a class="code" href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">to_string</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>[0]));</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>  testcase(<span class="stringliteral">"Bad Config"</span>);</div>
|
||||
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  </div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  { <span class="comment">// Two arguments are required - we pass one</span></div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(<span class="keywordtype">id</span>);</div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  </div>
|
||||
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">try</span></div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  {</div>
|
||||
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  fail(<span class="stringliteral">"Accepted only amendment ID"</span>);</div>
|
||||
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  }</div>
|
||||
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">catch</span> (...)</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>  pass();</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>  }</div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  </div>
|
||||
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  { <span class="comment">// Two arguments are required - we pass three</span></div>
|
||||
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(<span class="keywordtype">id</span> + <span class="stringliteral">" Test Name"</span>);</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">try</span></div>
|
||||
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  {</div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  fail(<span class="stringliteral">"Accepted extra arguments"</span>);</div>
|
||||
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  }</div>
|
||||
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordflow">catch</span> (...)</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>  pass();</div>
|
||||
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  }</div>
|
||||
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  }</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>  {</div>
|
||||
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keyword">auto</span> sid = id;</div>
|
||||
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  sid.resize(sid.length() - 1);</div>
|
||||
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  </div>
|
||||
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(sid + <span class="stringliteral">" Name"</span>);</div>
|
||||
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  </div>
|
||||
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keywordflow">try</span></div>
|
||||
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  {</div>
|
||||
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  fail(<span class="stringliteral">"Accepted short amendment ID"</span>);</div>
|
||||
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  }</div>
|
||||
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordflow">catch</span> (...)</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>  pass();</div>
|
||||
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  }</div>
|
||||
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  }</div>
|
||||
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  </div>
|
||||
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  {</div>
|
||||
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keyword">auto</span> sid = id;</div>
|
||||
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  sid.resize(sid.length() + 1, <span class="charliteral">'0'</span>);</div>
|
||||
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  </div>
|
||||
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(sid + <span class="stringliteral">" Name"</span>);</div>
|
||||
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  </div>
|
||||
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keywordflow">try</span></div>
|
||||
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  {</div>
|
||||
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  fail(<span class="stringliteral">"Accepted long amendment ID"</span>);</div>
|
||||
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  }</div>
|
||||
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keywordflow">catch</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>  pass();</div>
|
||||
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  }</div>
|
||||
<div class="line"><a name="l00238"></a><span class="lineno"> 238</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>  {</div>
|
||||
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keyword">auto</span> sid = id;</div>
|
||||
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  sid.resize(sid.length() - 1);</div>
|
||||
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  sid.push_back(<span class="charliteral">'Q'</span>);</div>
|
||||
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  </div>
|
||||
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <a class="code" href="classripple_1_1Section.html">Section</a> test = section;</div>
|
||||
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  test.<a class="code" href="classripple_1_1Section.html#aa94166c41decc5127022863dfee030b7">append</a>(sid + <span class="stringliteral">" Name"</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>  <span class="keywordflow">try</span></div>
|
||||
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  {</div>
|
||||
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <span class="keywordflow">if</span> (<a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2, test, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>, <a class="code" href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">emptySection</a>))</div>
|
||||
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  fail(<span class="stringliteral">"Accepted non-hex amendment ID"</span>);</div>
|
||||
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  }</div>
|
||||
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keywordflow">catch</span> (...)</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>  pass();</div>
|
||||
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  }</div>
|
||||
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  }</div>
|
||||
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  }</div>
|
||||
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  </div>
|
||||
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/map.html">std::map<uint256, bool></a></div>
|
||||
<div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4"> 261</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4">getState</a>(<a class="code" href="classripple_1_1AmendmentTable.html">AmendmentTable</a>* table, <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<uint256></a> <span class="keyword">const</span>& exclude)</div>
|
||||
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  {</div>
|
||||
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/map.html">std::map<uint256, bool></a> state;</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>  <span class="keyword">auto</span> track = [&state, table](<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> <span class="keyword">const</span>& v) {</div>
|
||||
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : v)</div>
|
||||
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  {</div>
|
||||
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keyword">auto</span> <span class="keyword">const</span> <span class="keywordtype">id</span> = <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(a);</div>
|
||||
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  state[id] = table-><a class="code" href="classripple_1_1AmendmentTable.html#a190291d07831f18a0ce7847000c24f17">isEnabled</a>(<span class="keywordtype">id</span>);</div>
|
||||
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  }</div>
|
||||
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  };</div>
|
||||
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  </div>
|
||||
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>);</div>
|
||||
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>);</div>
|
||||
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>);</div>
|
||||
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>);</div>
|
||||
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  track(<a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>);</div>
|
||||
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  </div>
|
||||
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : exclude)</div>
|
||||
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  state.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/map/erase.html">erase</a>(a);</div>
|
||||
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  </div>
|
||||
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordflow">return</span> state;</div>
|
||||
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  }</div>
|
||||
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  </div>
|
||||
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a6a398f00d47d59c5cd380f399201cf7a"> 286</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a6a398f00d47d59c5cd380f399201cf7a">testEnableDisable</a>()</div>
|
||||
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  {</div>
|
||||
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  testcase(<span class="stringliteral">"enable & disable"</span>);</div>
|
||||
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  </div>
|
||||
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keyword">auto</span> <span class="keyword">const</span> testAmendment = <a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<span class="stringliteral">"TestAmendment"</span>);</div>
|
||||
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keyword">auto</span> table = <a class="code" href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">makeTable</a>(2);</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">// Subset of amendments to enable</span></div>
|
||||
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<uint256></a> enabled;</div>
|
||||
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(testAmendment);</div>
|
||||
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">m_set1</a>[0]));</div>
|
||||
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">m_set2</a>[0]));</div>
|
||||
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">m_set3</a>[0]));</div>
|
||||
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">m_set4</a>[0]));</div>
|
||||
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  enabled.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set/insert.html">insert</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">amendmentId</a>(<a class="code" href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">m_set5</a>[0]));</div>
|
||||
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  </div>
|
||||
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="comment">// Get the state before, excluding the items we'll change:</span></div>
|
||||
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <span class="keyword">auto</span> <span class="keyword">const</span> pre_state = <a class="code" href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4">getState</a>(table.get(), enabled);</div>
|
||||
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  </div>
|
||||
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="comment">// Enable the subset and verify</span></div>
|
||||
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : enabled)</div>
|
||||
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  table->enable(a);</div>
|
||||
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  </div>
|
||||
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : enabled)</div>
|
||||
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  BEAST_EXPECT(table->isEnabled(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="comment">// Disable the subset and verify</span></div>
|
||||
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : enabled)</div>
|
||||
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  table->disable(a);</div>
|
||||
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  </div>
|
||||
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& a : enabled)</div>
|
||||
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  BEAST_EXPECT(!table->isEnabled(a));</div>
|
||||
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  </div>
|
||||
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <span class="comment">// Get the state after, excluding the items we changed:</span></div>
|
||||
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <span class="keyword">auto</span> <span class="keyword">const</span> post_state = <a class="code" href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4">getState</a>(table.get(), enabled);</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="comment">// Ensure the states are identical</span></div>
|
||||
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <span class="keyword">auto</span> ret = <a class="codeRef" href="http://en.cppreference.com/w/cpp/algorithm/mismatch.html">std::mismatch</a>(</div>
|
||||
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  pre_state.begin(),</div>
|
||||
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  pre_state.end(),</div>
|
||||
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  post_state.begin(),</div>
|
||||
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  post_state.end());</div>
|
||||
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  </div>
|
||||
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  BEAST_EXPECT(ret.first == pre_state.end());</div>
|
||||
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  BEAST_EXPECT(ret.second == post_state.end());</div>
|
||||
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  }</div>
|
||||
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  </div>
|
||||
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::pair<PublicKey, SecretKey></a>></div>
|
||||
<div class="line"><a name="l00334"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#a155b9c97cff557ee78d0860071e0e1cf"> 334</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#a155b9c97cff557ee78d0860071e0e1cf">makeValidators</a>(<span class="keywordtype">int</span> num)</div>
|
||||
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  {</div>
|
||||
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::pair<PublicKey, SecretKey></a>> ret;</div>
|
||||
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  ret.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(num);</div>
|
||||
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < num; ++i)</div>
|
||||
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  {</div>
|
||||
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  ret.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(<a class="code" href="namespaceripple.html#ac52a0a522fc11bdd47fce39bd29f97bc">randomKeyPair</a>(<a class="code" href="namespaceripple.html#a9de744cfdefe1132969eb982e57e4ddea82c2b7829b8129e5a2d53665ba4b4757">KeyType::secp256k1</a>));</div>
|
||||
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  }</div>
|
||||
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="keywordflow">return</span> ret;</div>
|
||||
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  }</div>
|
||||
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  </div>
|
||||
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/time_point.html">NetClock::time_point</a></div>
|
||||
<div class="line"><a name="l00346"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#ab7e9b79a9bc679d4fe6e523f6c5af544"> 346</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#ab7e9b79a9bc679d4fe6e523f6c5af544">weekTime</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">weeks</a> w)</div>
|
||||
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  {</div>
|
||||
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="keywordflow">return</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/time_point.html">NetClock::time_point</a>{w};</div>
|
||||
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  }</div>
|
||||
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  </div>
|
||||
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="comment">// Execute a pretend consensus round for a flag ledger</span></div>
|
||||
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <span class="keywordtype">void</span></div>
|
||||
<div class="line"><a name="l00353"></a><span class="lineno"><a class="line" href="classripple_1_1AmendmentTable__test.html#ab7bc1653c034aa3a5fa820f9d090a8e9"> 353</a></span>  <a class="code" href="classripple_1_1AmendmentTable__test.html#ab7bc1653c034aa3a5fa820f9d090a8e9">doRound</a>(</div>
|
||||
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <a class="code" href="classripple_1_1AmendmentTable.html">AmendmentTable</a>& table,</div>
|
||||
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">weeks</a> week,</div>
|
||||
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair<PublicKey, SecretKey></a>> <span class="keyword">const</span>& validators,</div>
|
||||
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair<uint256, int></a>> <span class="keyword">const</span>& votes,</div>
|
||||
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<uint256></a>& ourVotes,</div>
|
||||
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<uint256></a>& enabled,</div>
|
||||
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/map.html">majorityAmendments_t</a>& majority)</div>
|
||||
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  {</div>
|
||||
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="comment">// Do a round at the specified time</span></div>
|
||||
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="comment">// Returns the amendments we voted for</span></div>
|
||||
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  </div>
|
||||
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="comment">// Parameters:</span></div>
|
||||
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  <span class="comment">// table: Our table of known and vetoed amendments</span></div>
|
||||
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <span class="comment">// validators: The addreses of validators we trust</span></div>
|
||||
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="comment">// votes: Amendments and the number of validators who vote for them</span></div>
|
||||
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="comment">// ourVotes: The amendments we vote for in our validation</span></div>
|
||||
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="comment">// enabled: In/out enabled amendments</span></div>
|
||||
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <span class="comment">// majority: In/our majority amendments (and when they got a majority)</span></div>
|
||||
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  </div>
|
||||
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <span class="keyword">auto</span> <span class="keyword">const</span> roundTime = <a class="code" href="classripple_1_1AmendmentTable__test.html#ab7e9b79a9bc679d4fe6e523f6c5af544">weekTime</a>(week);</div>
|
||||
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  </div>
|
||||
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="comment">// Build validations</span></div>
|
||||
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::shared_ptr<STValidation></a>> validations;</div>
|
||||
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  validations.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">reserve</a>(validators.size());</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>  <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& val : validators)</div>
|
||||
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  {</div>
|
||||
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  ++i;</div>
|
||||
<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<uint256></a> field;</div>
|
||||
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  </div>
|
||||
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& amendment : votes)</div>
|
||||
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  {</div>
|
||||
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  <span class="keywordflow">if</span> ((256 * i) < (validators.size() * amendment.second))</div>
|
||||
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  {</div>
|
||||
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  <span class="comment">// We vote yes on this amendment</span></div>
|
||||
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  field.push_back(amendment.first);</div>
|
||||
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  }</div>
|
||||
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  }</div>
|
||||
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  </div>
|
||||
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <span class="keyword">auto</span> v = std::make_shared<STValidation>(</div>
|
||||
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/time_point.html">ripple::NetClock::time_point</a>{},</div>
|
||||
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  val.first,</div>
|
||||
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  val.second,</div>
|
||||
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <a class="code" href="namespaceripple.html#a984ddd646f1e1a5032a9a17f96c6fc55">calcNodeID</a>(val.first),</div>
|
||||
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  [&field](<a class="code" href="classripple_1_1STValidation.html">STValidation</a>& v) {</div>
|
||||
<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  <span class="keywordflow">if</span> (!field.empty())</div>
|
||||
<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  v.setFieldV256(</div>
|
||||
<div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <a class="code" href="namespaceripple.html#a9e03c8b33593df82d17427a8771e3106">sfAmendments</a>, <a class="code" href="classripple_1_1STVector256.html">STVector256</a>(<a class="code" href="namespaceripple.html#a9e03c8b33593df82d17427a8771e3106">sfAmendments</a>, field));</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>  </div>
|
||||
<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  validations.<a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">emplace_back</a>(v);</div>
|
||||
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  }</div>
|
||||
@@ -479,7 +479,7 @@ $(function() {
|
||||
<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  ourVotes = table.<a class="code" href="classripple_1_1AmendmentTable.html#ad4448eeba600656f25e54dfcd18138af">doValidation</a>(enabled);</div>
|
||||
<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  </div>
|
||||
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <span class="keyword">auto</span> actions =</div>
|
||||
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  table.<a class="code" href="classripple_1_1AmendmentTable.html#a0ef8c954784eea2557318f9a313df97d">doVoting</a>(roundTime, enabled, majority, validations);</div>
|
||||
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  table.<a class="code" href="classripple_1_1AmendmentTable.html#a879dd1b8a9991c7c281fbaf377e425e1">doVoting</a>(roundTime, enabled, majority, validations);</div>
|
||||
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& action : actions)</div>
|
||||
<div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  {</div>
|
||||
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="comment">// This code assumes other validators do as we do</span></div>
|
||||
@@ -830,43 +830,41 @@ $(function() {
|
||||
<div class="line"><a name="l00759"></a><span class="lineno"> 759</span>  </div>
|
||||
<div class="line"><a name="l00760"></a><span class="lineno"> 760</span> } <span class="comment">// namespace ripple</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a9f0d3f0a6db2f649617bf4967e6a6cc4"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4">ripple::AmendmentTable_test::getState</a></div><div class="ttdeci">std::map< uint256, bool > getState(AmendmentTable *table, std::set< uint256 > const &exclude)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00260">AmendmentTable_test.cpp:260</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a9f0d3f0a6db2f649617bf4967e6a6cc4"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a9f0d3f0a6db2f649617bf4967e6a6cc4">ripple::AmendmentTable_test::getState</a></div><div class="ttdeci">std::map< uint256, bool > getState(AmendmentTable *table, std::set< uint256 > const &exclude)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00261">AmendmentTable_test.cpp:261</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1Section_html"><div class="ttname"><a href="classripple_1_1Section.html">ripple::Section</a></div><div class="ttdoc">Holds a collection of configuration values.</div><div class="ttdef"><b>Definition:</b> <a href="BasicConfig_8h_source.html#l00043">BasicConfig.h:43</a></div></div>
|
||||
<div class="ttc" id="afor_each_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/for_each.html">std::for_each</a></div><div class="ttdeci">T for_each(T... args)</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a69441b132ff46a6a6415de6a250ba444"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444">ripple::AmendmentTable_test::journal</a></div><div class="ttdeci">test::SuiteJournal journal</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00088">AmendmentTable_test.cpp:88</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a69441b132ff46a6a6415de6a250ba444"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a69441b132ff46a6a6415de6a250ba444">ripple::AmendmentTable_test::journal</a></div><div class="ttdeci">test::SuiteJournal journal</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00089">AmendmentTable_test.cpp:89</a></div></div>
|
||||
<div class="ttc" id="astructripple_1_1openssl__sha256__hasher_html"><div class="ttname"><a href="structripple_1_1openssl__sha256__hasher.html">ripple::openssl_sha256_hasher</a></div><div class="ttdoc">SHA-256 digest.</div><div class="ttdef"><b>Definition:</b> <a href="digest_8h_source.html#l00091">digest.h:91</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a72d9a5a65184efcde193236244044243"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a72d9a5a65184efcde193236244044243">ripple::AmendmentTable_test::testNoOnUnknown</a></div><div class="ttdeci">void testNoOnUnknown()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00451">AmendmentTable_test.cpp:451</a></div></div>
|
||||
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a2701412a11b118c19256a4c901db2938"><div class="ttname"><a href="namespaceripple.html#a2701412a11b118c19256a4c901db2938">ripple::BEAST_DEFINE_TESTSUITE</a></div><div class="ttdeci">BEAST_DEFINE_TESTSUITE(AccountTxPaging, app, ripple)</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a984ddd646f1e1a5032a9a17f96c6fc55"><div class="ttname"><a href="namespaceripple.html#a984ddd646f1e1a5032a9a17f96c6fc55">ripple::calcNodeID</a></div><div class="ttdeci">NodeID calcNodeID(PublicKey const &pk)</div><div class="ttdoc">Calculate the 160-bit node ID from a node public key.</div><div class="ttdef"><b>Definition:</b> <a href="PublicKey_8cpp_source.html#l00299">PublicKey.cpp:299</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a155b9c97cff557ee78d0860071e0e1cf"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a155b9c97cff557ee78d0860071e0e1cf">ripple::AmendmentTable_test::makeValidators</a></div><div class="ttdeci">std::vector< std::pair< PublicKey, SecretKey > > makeValidators(int num)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00333">AmendmentTable_test.cpp:333</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_ad7b462323ac411e0777de5afb69e5229"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#ad7b462323ac411e0777de5afb69e5229">ripple::AmendmentTable_test::makeSection</a></div><div class="ttdeci">static Section makeSection(uint256 const &amendment)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00073">AmendmentTable_test.cpp:73</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a57fa5cbb587e254813d53765a39765e4"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a57fa5cbb587e254813d53765a39765e4">ripple::AmendmentTable_test::makeTable</a></div><div class="ttdeci">std::unique_ptr< AmendmentTable > makeTable(int w)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00113">AmendmentTable_test.cpp:113</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a155b9c97cff557ee78d0860071e0e1cf"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a155b9c97cff557ee78d0860071e0e1cf">ripple::AmendmentTable_test::makeValidators</a></div><div class="ttdeci">std::vector< std::pair< PublicKey, SecretKey > > makeValidators(int num)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00334">AmendmentTable_test.cpp:334</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_ad7b462323ac411e0777de5afb69e5229"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#ad7b462323ac411e0777de5afb69e5229">ripple::AmendmentTable_test::makeSection</a></div><div class="ttdeci">static Section makeSection(uint256 const &amendment)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00074">AmendmentTable_test.cpp:74</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a57fa5cbb587e254813d53765a39765e4"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a57fa5cbb587e254813d53765a39765e4">ripple::AmendmentTable_test::makeTable</a></div><div class="ttdeci">std::unique_ptr< AmendmentTable > makeTable(int w)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00114">AmendmentTable_test.cpp:114</a></div></div>
|
||||
<div class="ttc" id="apair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a></div></div>
|
||||
<div class="ttc" id="areserve_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/reserve.html">std::vector::reserve</a></div><div class="ttdeci">T reserve(T... args)</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a21df0616d67d6cb97c9d6e99e6673e39"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">ripple::AmendmentTable_test::m_set5</a></div><div class="ttdeci">const std::vector< std::string > m_set5</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00084">AmendmentTable_test.cpp:84</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a21df0616d67d6cb97c9d6e99e6673e39"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a21df0616d67d6cb97c9d6e99e6673e39">ripple::AmendmentTable_test::m_set5</a></div><div class="ttdeci">const std::vector< std::string > m_set5</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00085">AmendmentTable_test.cpp:85</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a106f8e1bcc2b6e89241284c6c4f7d08b"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a106f8e1bcc2b6e89241284c6c4f7d08b">ripple::AmendmentTable_test::testDetectMajority</a></div><div class="ttdeci">void testDetectMajority()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00579">AmendmentTable_test.cpp:579</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a0da93197ddc8b1ca29e80e9a4adffbc7"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a0da93197ddc8b1ca29e80e9a4adffbc7">ripple::AmendmentTable_test::testConstruct</a></div><div class="ttdeci">void testConstruct()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00120">AmendmentTable_test.cpp:120</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a0da93197ddc8b1ca29e80e9a4adffbc7"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a0da93197ddc8b1ca29e80e9a4adffbc7">ripple::AmendmentTable_test::testConstruct</a></div><div class="ttdeci">void testConstruct()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00121">AmendmentTable_test.cpp:121</a></div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector< std::string ></a></div></div>
|
||||
<div class="ttc" id="afind_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/set/find.html">std::set::find</a></div><div class="ttdeci">T find(T... args)</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_ac19cff417e1091f50fc523c5a1755d62"><div class="ttname"><a href="namespaceripple.html#ac19cff417e1091f50fc523c5a1755d62">ripple::make_AmendmentTable</a></div><div class="ttdeci">std::unique_ptr< AmendmentTable > make_AmendmentTable(std::chrono::seconds majorityTime, int majorityFraction, Section const &supported, Section const &enabled, Section const &vetoed, beast::Journal journal)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable_8cpp_source.html#l00654">AmendmentTable.cpp:654</a></div></div>
|
||||
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_aab402a55ace3230d34f17ab2c4360841"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#aab402a55ace3230d34f17ab2c4360841">ripple::AmendmentTable_test::testNoOnVetoed</a></div><div class="ttdeci">void testNoOnVetoed()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00490">AmendmentTable_test.cpp:490</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a06fc4b773cbfc7d35c6b07f7944622e0"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">ripple::AmendmentTable_test::createSet</a></div><div class="ttdeci">static std::vector< std::string > createSet(int group, int count)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00054">AmendmentTable_test.cpp:54</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable_html_a0ef8c954784eea2557318f9a313df97d"><div class="ttname"><a href="classripple_1_1AmendmentTable.html#a0ef8c954784eea2557318f9a313df97d">ripple::AmendmentTable::doVoting</a></div><div class="ttdeci">virtual std::map< uint256, std::uint32_t > doVoting(NetClock::time_point closeTime, std::set< uint256 > const &enabledAmendments, majorityAmendments_t const &majorityAmendments, std::vector< STValidation::pointer > const &valSet)=0</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a06fc4b773cbfc7d35c6b07f7944622e0"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a06fc4b773cbfc7d35c6b07f7944622e0">ripple::AmendmentTable_test::createSet</a></div><div class="ttdeci">static std::vector< std::string > createSet(int group, int count)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00055">AmendmentTable_test.cpp:55</a></div></div>
|
||||
<div class="ttc" id="aduration_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::duration</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_ad497a3f1cdc57ff5879fe67eeb659526"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#ad497a3f1cdc57ff5879fe67eeb659526">ripple::AmendmentTable_test::testLostMajority</a></div><div class="ttdeci">void testLostMajority()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00642">AmendmentTable_test.cpp:642</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a7cc64e12723fbc9606d85442a2569feda13b5bfe96f3e2fe411c9f66f4a582adf"><div class="ttname"><a href="namespaceripple.html#a7cc64e12723fbc9606d85442a2569feda13b5bfe96f3e2fe411c9f66f4a582adf">ripple::QualityDirection::in</a></div><div class="ttdeci">@ in</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_afaa42808cfa48a6f48c5aef8709e9daf"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#afaa42808cfa48a6f48c5aef8709e9daf">ripple::AmendmentTable_test::testHasUnsupported</a></div><div class="ttdeci">void testHasUnsupported()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00710">AmendmentTable_test.cpp:710</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a96888695e8d79474e080c334f149e30a"><div class="ttname"><a href="namespaceripple.html#a96888695e8d79474e080c334f149e30a">ripple::to_string</a></div><div class="ttdeci">std::string to_string(ListDisposition disposition)</div><div class="ttdef"><b>Definition:</b> <a href="ValidatorList_8cpp_source.html#l00041">ValidatorList.cpp:41</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a9537bdb5032b0ed38b7e9a08ceb4f994"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">ripple::AmendmentTable_test::m_set2</a></div><div class="ttdeci">const std::vector< std::string > m_set2</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00081">AmendmentTable_test.cpp:81</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a9537bdb5032b0ed38b7e9a08ceb4f994"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a9537bdb5032b0ed38b7e9a08ceb4f994">ripple::AmendmentTable_test::m_set2</a></div><div class="ttdeci">const std::vector< std::string > m_set2</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00082">AmendmentTable_test.cpp:82</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a24beb52a8f552c7fc4da41fce5e20c06"><div class="ttname"><a href="namespaceripple.html#a24beb52a8f552c7fc4da41fce5e20c06">ripple::tfLostMajority</a></div><div class="ttdeci">const std::uint32_t tfLostMajority</div><div class="ttdef"><b>Definition:</b> <a href="TxFlags_8h_source.html#l00102">TxFlags.h:102</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a815e32da6cdc73f9585ba984a8d6135f"><div class="ttname"><a href="namespaceripple.html#a815e32da6cdc73f9585ba984a8d6135f">ripple::tfGotMajority</a></div><div class="ttdeci">const std::uint32_t tfGotMajority</div><div class="ttdef"><b>Definition:</b> <a href="TxFlags_8h_source.html#l00101">TxFlags.h:101</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html_a5342507fe2fb5ac55d578e7e98863f70"><div class="ttname"><a href="classripple_1_1base__uint.html#a5342507fe2fb5ac55d578e7e98863f70">ripple::base_uint::data</a></div><div class="ttdeci">pointer data()</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00103">base_uint.h:103</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_ab7e9b79a9bc679d4fe6e523f6c5af544"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#ab7e9b79a9bc679d4fe6e523f6c5af544">ripple::AmendmentTable_test::weekTime</a></div><div class="ttdeci">static NetClock::time_point weekTime(weeks w)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00345">AmendmentTable_test.cpp:345</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_ab7e9b79a9bc679d4fe6e523f6c5af544"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#ab7e9b79a9bc679d4fe6e523f6c5af544">ripple::AmendmentTable_test::weekTime</a></div><div class="ttdeci">static NetClock::time_point weekTime(weeks w)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00346">AmendmentTable_test.cpp:346</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1STValidation_html"><div class="ttname"><a href="classripple_1_1STValidation.html">ripple::STValidation</a></div><div class="ttdef"><b>Definition:</b> <a href="STValidation_8h_source.html#l00043">STValidation.h:43</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< std::string > const &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#l00040">BasicConfig.cpp:40</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a356c68147333a9a48a344718038576d9"><div class="ttname"><a href="namespaceripple.html#a356c68147333a9a48a344718038576d9">ripple::uint256</a></div><div class="ttdeci">base_uint< 256 > uint256</div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00493">base_uint.h:493</a></div></div>
|
||||
<div class="ttc" id="apush_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">std::vector::push_back</a></div><div class="ttdeci">T push_back(T... args)</div></div>
|
||||
<div class="ttc" id="amismatch_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/mismatch.html">std::mismatch</a></div><div class="ttdeci">T mismatch(T... args)</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint< 256 ></a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a6eab3a5ee85e00078b47947e27e59535"><div class="ttname"><a href="namespaceripple.html#a6eab3a5ee85e00078b47947e27e59535">ripple::weeks</a></div><div class="ttdeci">std::chrono::duration< int, std::ratio_multiply< days::period, std::ratio< 7 > >> weeks</div><div class="ttdef"><b>Definition:</b> <a href="chrono_8h_source.html#l00039">chrono.h:39</a></div></div>
|
||||
@@ -875,40 +873,42 @@ $(function() {
|
||||
<div class="ttc" id="atime_point_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/time_point.html">std::chrono::time_point</a></div></div>
|
||||
<div class="ttc" id="aerase_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/map/erase.html">std::map::erase</a></div><div class="ttdeci">T erase(T... args)</div></div>
|
||||
<div class="ttc" id="amap_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/map.html">std::map</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a4563da972947a03d28cfa0c57990d3cd"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">ripple::AmendmentTable_test::emptySection</a></div><div class="ttdeci">const Section emptySection</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00086">AmendmentTable_test.cpp:86</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable_html_a879dd1b8a9991c7c281fbaf377e425e1"><div class="ttname"><a href="classripple_1_1AmendmentTable.html#a879dd1b8a9991c7c281fbaf377e425e1">ripple::AmendmentTable::doVoting</a></div><div class="ttdeci">virtual std::map< uint256, std::uint32_t > doVoting(NetClock::time_point closeTime, std::set< uint256 > const &enabledAmendments, majorityAmendments_t const &majorityAmendments, std::vector< std::shared_ptr< STValidation >> const &valSet)=0</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a4563da972947a03d28cfa0c57990d3cd"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a4563da972947a03d28cfa0c57990d3cd">ripple::AmendmentTable_test::emptySection</a></div><div class="ttdeci">const Section emptySection</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00087">AmendmentTable_test.cpp:87</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a06b70700f0dda477f551da95b8328065"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a06b70700f0dda477f551da95b8328065">ripple::AmendmentTable_test::testVoteEnable</a></div><div class="ttdeci">void testVoteEnable()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00529">AmendmentTable_test.cpp:529</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1test_1_1SuiteJournal_html"><div class="ttname"><a href="classripple_1_1test_1_1SuiteJournal.html">ripple::test::SuiteJournal</a></div><div class="ttdef"><b>Definition:</b> <a href="SuiteJournal_8h_source.html#l00088">SuiteJournal.h:88</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a9de744cfdefe1132969eb982e57e4ddea82c2b7829b8129e5a2d53665ba4b4757"><div class="ttname"><a href="namespaceripple.html#a9de744cfdefe1132969eb982e57e4ddea82c2b7829b8129e5a2d53665ba4b4757">ripple::KeyType::secp256k1</a></div><div class="ttdeci">@ secp256k1</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_ac52a0a522fc11bdd47fce39bd29f97bc"><div class="ttname"><a href="namespaceripple.html#ac52a0a522fc11bdd47fce39bd29f97bc">ripple::randomKeyPair</a></div><div class="ttdeci">std::pair< PublicKey, SecretKey > randomKeyPair(KeyType type)</div><div class="ttdoc">Create a key pair using secure random numbers.</div><div class="ttdef"><b>Definition:</b> <a href="SecretKey_8cpp_source.html#l00260">SecretKey.cpp:260</a></div></div>
|
||||
<div class="ttc" id="aemplace_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/emplace_back.html">std::vector::emplace_back</a></div><div class="ttdeci">T emplace_back(T... args)</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="RCLCensorshipDetector_8h_source.html#l00029">RCLCensorshipDetector.h:29</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a8d1ae28ade4149f3b3ed62ecbdeb0669"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a8d1ae28ade4149f3b3ed62ecbdeb0669">ripple::AmendmentTable_test::majorityFraction</a></div><div class="ttdeci">static const int majorityFraction</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00039">AmendmentTable_test.cpp:39</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_aade47bfc870e1055e6a8ab4c6551a990"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#aade47bfc870e1055e6a8ab4c6551a990">ripple::AmendmentTable_test::testGet</a></div><div class="ttdeci">void testGet()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00146">AmendmentTable_test.cpp:146</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a8d1ae28ade4149f3b3ed62ecbdeb0669"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a8d1ae28ade4149f3b3ed62ecbdeb0669">ripple::AmendmentTable_test::majorityFraction</a></div><div class="ttdeci">static const int majorityFraction</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00040">AmendmentTable_test.cpp:40</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_aade47bfc870e1055e6a8ab4c6551a990"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#aade47bfc870e1055e6a8ab4c6551a990">ripple::AmendmentTable_test::testGet</a></div><div class="ttdeci">void testGet()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00147">AmendmentTable_test.cpp:147</a></div></div>
|
||||
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/begin.html">std::vector::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
|
||||
<div class="ttc" id="ainsert_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/set/insert.html">std::set::insert</a></div><div class="ttdeci">T insert(T... args)</div></div>
|
||||
<div class="ttc" id="anamespacebeast_html_a4a9eebb8b68941c49b07763d7a95d456"><div class="ttname"><a href="namespacebeast.html#a4a9eebb8b68941c49b07763d7a95d456">beast::hash_append</a></div><div class="ttdeci">std::enable_if_t< is_contiguously_hashable< T, Hasher >::value > hash_append(Hasher &h, T const &t) noexcept</div><div class="ttdoc">Logically concatenate input data to a Hasher.</div><div class="ttdef"><b>Definition:</b> <a href="hash__append_8h_source.html#l00232">hash_append.h:232</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_ab7bc1653c034aa3a5fa820f9d090a8e9"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#ab7bc1653c034aa3a5fa820f9d090a8e9">ripple::AmendmentTable_test::doRound</a></div><div class="ttdeci">void doRound(AmendmentTable &table, weeks week, std::vector< std::pair< PublicKey, SecretKey >> const &validators, std::vector< std::pair< uint256, int >> const &votes, std::vector< uint256 > &ourVotes, std::set< uint256 > &enabled, majorityAmendments_t &majority)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00352">AmendmentTable_test.cpp:352</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a1641fc8e6d04d8ff5f85d1fbd11c535d"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">ripple::AmendmentTable_test::makeSection</a></div><div class="ttdeci">static Section makeSection(std::vector< std::string > const &amendments)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00064">AmendmentTable_test.cpp:64</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_ab7bc1653c034aa3a5fa820f9d090a8e9"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#ab7bc1653c034aa3a5fa820f9d090a8e9">ripple::AmendmentTable_test::doRound</a></div><div class="ttdeci">void doRound(AmendmentTable &table, weeks week, std::vector< std::pair< PublicKey, SecretKey >> const &validators, std::vector< std::pair< uint256, int >> const &votes, std::vector< uint256 > &ourVotes, std::set< uint256 > &enabled, majorityAmendments_t &majority)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00353">AmendmentTable_test.cpp:353</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a1641fc8e6d04d8ff5f85d1fbd11c535d"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a1641fc8e6d04d8ff5f85d1fbd11c535d">ripple::AmendmentTable_test::makeSection</a></div><div class="ttdeci">static Section makeSection(std::vector< std::string > const &amendments)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00065">AmendmentTable_test.cpp:65</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a06da0e52773c5c0841994317a3d5e3d0"><div class="ttname"><a href="namespaceripple.html#a06da0e52773c5c0841994317a3d5e3d0">ripple::hash_append</a></div><div class="ttdeci">void hash_append(Hasher &h, Slice const &v)</div><div class="ttdef"><b>Definition:</b> <a href="Slice_8h_source.html#l00149">Slice.h:149</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a5eb44c659162f43f93753c6b73769d6d"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">ripple::AmendmentTable_test::m_set4</a></div><div class="ttdeci">const std::vector< std::string > m_set4</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00083">AmendmentTable_test.cpp:83</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a0b259aa72801f216e146d7b6d0039eb3"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">ripple::AmendmentTable_test::m_set1</a></div><div class="ttdeci">const std::vector< std::string > m_set1</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00080">AmendmentTable_test.cpp:80</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1STVector256_html"><div class="ttname"><a href="classripple_1_1STVector256.html">ripple::STVector256</a></div><div class="ttdef"><b>Definition:</b> <a href="STVector256_8h_source.html#l00029">STVector256.h:29</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a5eb44c659162f43f93753c6b73769d6d"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a5eb44c659162f43f93753c6b73769d6d">ripple::AmendmentTable_test::m_set4</a></div><div class="ttdeci">const std::vector< std::string > m_set4</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00084">AmendmentTable_test.cpp:84</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a0b259aa72801f216e146d7b6d0039eb3"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a0b259aa72801f216e146d7b6d0039eb3">ripple::AmendmentTable_test::m_set1</a></div><div class="ttdeci">const std::vector< std::string > m_set1</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00081">AmendmentTable_test.cpp:81</a></div></div>
|
||||
<div class="ttc" id="aempty_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/map/empty.html">std::map::empty</a></div><div class="ttdeci">T empty(T... args)</div></div>
|
||||
<div class="ttc" id="amemcpy_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/memcpy.html">std::memcpy</a></div><div class="ttdeci">T memcpy(T... args)</div></div>
|
||||
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/set/end.html">std::set::end</a></div><div class="ttdeci">T end(T... args)</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html">ripple::AmendmentTable_test</a></div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00035">AmendmentTable_test.cpp:35</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a1d75af6489e699e5afeebed81edf6470"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">ripple::AmendmentTable_test::m_set3</a></div><div class="ttdeci">const std::vector< std::string > m_set3</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00082">AmendmentTable_test.cpp:82</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a9e03c8b33593df82d17427a8771e3106"><div class="ttname"><a href="namespaceripple.html#a9e03c8b33593df82d17427a8771e3106">ripple::sfAmendments</a></div><div class="ttdeci">const SF_Vec256 sfAmendments(access, STI_VECTOR256, 3, "Amendments")</div><div class="ttdef"><b>Definition:</b> <a href="SField_8h_source.html#l00491">SField.h:491</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html">ripple::AmendmentTable_test</a></div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00036">AmendmentTable_test.cpp:36</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a1d75af6489e699e5afeebed81edf6470"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a1d75af6489e699e5afeebed81edf6470">ripple::AmendmentTable_test::m_set3</a></div><div class="ttdeci">const std::vector< std::string > m_set3</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00083">AmendmentTable_test.cpp:83</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable_html"><div class="ttname"><a href="classripple_1_1AmendmentTable.html">ripple::AmendmentTable</a></div><div class="ttdoc">The amendment table stores the list of enabled and potential amendments.</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable_8h_source.html#l00034">AmendmentTable.h:34</a></div></div>
|
||||
<div class="ttc" id="aunique_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="astructripple_1_1STValidation_1_1FeeSettings_html"><div class="ttname"><a href="structripple_1_1STValidation_1_1FeeSettings.html">ripple::STValidation::FeeSettings</a></div><div class="ttdoc">Fees to set when issuing a new validation.</div><div class="ttdef"><b>Definition:</b> <a href="STValidation_8h_source.html#l00099">STValidation.h:99</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a5c3e6df34f12225704a4e082566ad04d"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a5c3e6df34f12225704a4e082566ad04d">ripple::AmendmentTable_test::AmendmentTable_test</a></div><div class="ttdeci">AmendmentTable_test()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00091">AmendmentTable_test.cpp:91</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_ae16e2917296fdfba2a7a41982e2cf286"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#ae16e2917296fdfba2a7a41982e2cf286">ripple::AmendmentTable_test::testBadConfig</a></div><div class="ttdeci">void testBadConfig()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00166">AmendmentTable_test.cpp:166</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a5c3e6df34f12225704a4e082566ad04d"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a5c3e6df34f12225704a4e082566ad04d">ripple::AmendmentTable_test::AmendmentTable_test</a></div><div class="ttdeci">AmendmentTable_test()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00092">AmendmentTable_test.cpp:92</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_ae16e2917296fdfba2a7a41982e2cf286"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#ae16e2917296fdfba2a7a41982e2cf286">ripple::AmendmentTable_test::testBadConfig</a></div><div class="ttdeci">void testBadConfig()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00167">AmendmentTable_test.cpp:167</a></div></div>
|
||||
<div class="ttc" id="aset_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/set.html">std::set</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_afb96bed7fb8f83bca62154592c6f1b8c"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#afb96bed7fb8f83bca62154592c6f1b8c">ripple::AmendmentTable_test::run</a></div><div class="ttdeci">void run() override</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00743">AmendmentTable_test.cpp:743</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a27d2cba83ae465b28285542137b3c95a"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">ripple::AmendmentTable_test::amendmentId</a></div><div class="ttdeci">static uint256 amendmentId(std::string in)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00042">AmendmentTable_test.cpp:42</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a27d2cba83ae465b28285542137b3c95a"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a27d2cba83ae465b28285542137b3c95a">ripple::AmendmentTable_test::amendmentId</a></div><div class="ttdeci">static uint256 amendmentId(std::string in)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00043">AmendmentTable_test.cpp:43</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable_html_ad4448eeba600656f25e54dfcd18138af"><div class="ttname"><a href="classripple_1_1AmendmentTable.html#ad4448eeba600656f25e54dfcd18138af">ripple::AmendmentTable::doValidation</a></div><div class="ttdeci">virtual std::vector< uint256 > doValidation(std::set< uint256 > const &enabled)=0</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable_html_a190291d07831f18a0ce7847000c24f17"><div class="ttname"><a href="classripple_1_1AmendmentTable.html#a190291d07831f18a0ce7847000c24f17">ripple::AmendmentTable::isEnabled</a></div><div class="ttdeci">virtual bool isEnabled(uint256 const &amendment)=0</div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a857ba4e709d33e046f370ecafbb16c8b"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">ripple::AmendmentTable_test::makeTable</a></div><div class="ttdeci">std::unique_ptr< AmendmentTable > makeTable(int w, Section const supported, Section const enabled, Section const vetoed)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00102">AmendmentTable_test.cpp:102</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a6a398f00d47d59c5cd380f399201cf7a"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a6a398f00d47d59c5cd380f399201cf7a">ripple::AmendmentTable_test::testEnableDisable</a></div><div class="ttdeci">void testEnableDisable()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00285">AmendmentTable_test.cpp:285</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a857ba4e709d33e046f370ecafbb16c8b"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a857ba4e709d33e046f370ecafbb16c8b">ripple::AmendmentTable_test::makeTable</a></div><div class="ttdeci">std::unique_ptr< AmendmentTable > makeTable(int w, Section const supported, Section const enabled, Section const vetoed)</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00103">AmendmentTable_test.cpp:103</a></div></div>
|
||||
<div class="ttc" id="aclassripple_1_1AmendmentTable__test_html_a6a398f00d47d59c5cd380f399201cf7a"><div class="ttname"><a href="classripple_1_1AmendmentTable__test.html#a6a398f00d47d59c5cd380f399201cf7a">ripple::AmendmentTable_test::testEnableDisable</a></div><div class="ttdeci">void testEnableDisable()</div><div class="ttdef"><b>Definition:</b> <a href="AmendmentTable__test_8cpp_source.html#l00286">AmendmentTable_test.cpp:286</a></div></div>
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||
|
||||
Reference in New Issue
Block a user