Files
rippled/tx__reduce__relay__test_8cpp_source.html
2022-08-26 20:04:15 +00:00

420 lines
80 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rippled: tx_reduce_relay_test.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">rippled
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_120ed4da3e3217b1e7fc0b4f48568e79.html">test</a></li><li class="navelem"><a class="el" href="dir_d1feb4416989cd829d5b1945d720f449.html">overlay</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">tx_reduce_relay_test.cpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//------------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> This file is part of rippled: https://github.com/ripple/rippled</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> Copyright 2020 Ripple Labs Inc.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> Permission to use, copy, modify, and/or distribute this software for any</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> purpose with or without fee is hereby granted, provided that the above</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> copyright notice and this permission notice appear in all copies.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;ripple/basics/make_SSLContext.h&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;ripple/beast/unit_test.h&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &lt;ripple/overlay/impl/OverlayImpl.h&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;ripple/overlay/impl/PeerImp.h&gt;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;ripple/peerfinder/impl/SlotImp.h&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;test/jtx/Env.h&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="keyword">namespace </span>test {</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html"> 30</a></span>&#160;<span class="keyword">class </span><a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html">tx_reduce_relay_test</a> : <span class="keyword">public</span> beast::unit_test::suite</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;{</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#af2a877271fc33abaefcd7aa68d9050c0"> 33</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#af2a877271fc33abaefcd7aa68d9050c0">socket_type</a> = boost::asio::ip::tcp::socket;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a9a3a05f3e2b91625530437f43e5ec241"> 34</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a9a3a05f3e2b91625530437f43e5ec241">middle_type</a> = boost::beast::tcp_stream;</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ac61a0165aaf8a9ccd5f6c2f43b807fd6"> 35</a></span>&#160; <span class="keyword">using</span> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ac61a0165aaf8a9ccd5f6c2f43b807fd6">stream_type</a> = boost::beast::ssl_stream&lt;middle_type&gt;;</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#afba935f45f518aabf9cd3ed64aab09f8"> 36</a></span>&#160; <span class="keyword">using</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">shared_context</a> = <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;boost::asio::ssl::context&gt;</a>;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a13548c221c573b096129053c50ead434"> 40</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a13548c221c573b096129053c50ead434">doTest</a>(<span class="keyword">const</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; msg, <span class="keywordtype">bool</span> log, <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt;<span class="keywordtype">void</span>(<span class="keywordtype">bool</span>)&gt; f)</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; {</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; testcase(msg);</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; f(log);</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; }</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a530e0d78db55737f7b05e99af5dedb34"> 47</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a530e0d78db55737f7b05e99af5dedb34">testConfig</a>(<span class="keywordtype">bool</span> log)</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; {</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a13548c221c573b096129053c50ead434">doTest</a>(<span class="stringliteral">&quot;Config Test&quot;</span>, log, [&amp;](<span class="keywordtype">bool</span> log) {</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keyword">auto</span> test = [&amp;](<span class="keywordtype">bool</span> enable,</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keywordtype">bool</span> metrics,</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> min,</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> pct,</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordtype">bool</span> success = <span class="keyword">true</span>) {</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/io/basic_stringstream.html">std::stringstream</a> str(<span class="stringliteral">&quot;[reduce_relay]&quot;</span>);</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; str &lt;&lt; <span class="stringliteral">&quot;[reduce_relay]\n&quot;</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; &lt;&lt; <span class="stringliteral">&quot;tx_enable=&quot;</span> &lt;&lt; <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(enable) &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; &lt;&lt; <span class="stringliteral">&quot;tx_metrics=&quot;</span> &lt;&lt; <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(metrics) &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; &lt;&lt; <span class="stringliteral">&quot;tx_min_peers=&quot;</span> &lt;&lt; min &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; &lt;&lt; <span class="stringliteral">&quot;tx_relay_percentage=&quot;</span> &lt;&lt; pct &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="code" href="classripple_1_1Config.html">Config</a> c;</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordflow">try</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; {</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; c.<a class="code" href="classripple_1_1Config.html#acec216c5b37b6d4ac971e1ff62142963">loadFromString</a>(str.<a class="codeRef" href="http://en.cppreference.com/w/cpp/io/basic_stringstream/str.html">str</a>());</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; BEAST_EXPECT(c.<a class="code" href="classripple_1_1Config.html#a83ff989bc69d931321cc8efaecbb1c0c">TX_REDUCE_RELAY_ENABLE</a> == enable);</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; BEAST_EXPECT(c.<a class="code" href="classripple_1_1Config.html#a9433d2b86e6e37bfcec0066ba608d354">TX_REDUCE_RELAY_METRICS</a> == metrics);</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; BEAST_EXPECT(c.<a class="code" href="classripple_1_1Config.html#a571b13011e10271dd2c5c010106389d8">TX_REDUCE_RELAY_MIN_PEERS</a> == min);</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; BEAST_EXPECT(c.<a class="code" href="classripple_1_1Config.html#aa03bee9cf3f844d3539a85fbc2a9184a">TX_RELAY_PERCENTAGE</a> == pct);</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordflow">if</span> (success)</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; pass();</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordflow">else</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; fail();</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; }</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keywordflow">catch</span> (...)</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; {</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keywordflow">if</span> (success)</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; fail();</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keywordflow">else</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; pass();</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; }</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; };</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; test(<span class="keyword">true</span>, <span class="keyword">true</span>, 20, 25);</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; test(<span class="keyword">false</span>, <span class="keyword">false</span>, 20, 25);</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; test(<span class="keyword">false</span>, <span class="keyword">false</span>, 20, 0, <span class="keyword">false</span>);</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; test(<span class="keyword">false</span>, <span class="keyword">false</span>, 20, 101, <span class="keyword">false</span>);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; test(<span class="keyword">false</span>, <span class="keyword">false</span>, 9, 10, <span class="keyword">false</span>);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; test(<span class="keyword">false</span>, <span class="keyword">false</span>, 10, 9, <span class="keyword">false</span>);</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; });</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; }</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; </div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html"> 93</a></span>&#160; <span class="keyword">class </span><a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html">PeerTest</a> : <span class="keyword">public</span> <a class="code" href="classripple_1_1PeerImp.html">PeerImp</a></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; {</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#abf00c4c037bee14646856abe64441cbb"> 96</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#abf00c4c037bee14646856abe64441cbb">PeerTest</a>(</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <a class="code" href="classripple_1_1Application.html">Application</a>&amp; app,</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;PeerFinder::Slot&gt;</a> <span class="keyword">const</span>&amp; <a class="code" href="classripple_1_1PeerImp.html#a96c66532d142fa63764aadffbfc6fe88">slot</a>,</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a>&amp;&amp; request,</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <a class="code" href="classripple_1_1PublicKey.html">PublicKey</a> <span class="keyword">const</span>&amp; publicKey,</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">ProtocolVersion</a> <a class="code" href="namespaceprotocol.html">protocol</a>,</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <a class="code" href="classripple_1_1Resource_1_1Consumer.html">Resource::Consumer</a> consumer,</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr&lt;tx_reduce_relay_test::stream_type&gt;</a>&amp;&amp; stream_ptr,</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <a class="code" href="classripple_1_1OverlayImpl.html">OverlayImpl</a>&amp; overlay)</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; : <a class="code" href="classripple_1_1PeerImp.html">PeerImp</a>(</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; app,</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#abef4d22826e76649b0c27a333718b4fb">sid_</a>,</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <a class="code" href="classripple_1_1PeerImp.html#a96c66532d142fa63764aadffbfc6fe88">slot</a>,</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <a class="code" href="namespacestd.html">std</a>::move(request),</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; publicKey,</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <a class="code" href="namespaceprotocol.html">protocol</a>,</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; consumer,</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <a class="code" href="namespacestd.html">std</a>::move(stream_ptr),</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; overlay)</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; {</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#abef4d22826e76649b0c27a333718b4fb">sid_</a>++;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; }</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a377cd0c70b2399f6a1e256ef08748329">~PeerTest</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a3f5b05ae02ef643a45f7f39db8565298"> 121</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a3f5b05ae02ef643a45f7f39db8565298">run</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; }</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a8acefb03a28d2d12b5d56f59a3b77905"> 125</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a8acefb03a28d2d12b5d56f59a3b77905">send</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;Message&gt;</a> <span class="keyword">const</span>&amp;)<span class="keyword"> override</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a4271a7682b7b080a6a889794d4c5ea98">sendTx_</a>++;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; }</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a9f00f294be4b8bcc2e63eafa2d6c0593"> 130</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a9f00f294be4b8bcc2e63eafa2d6c0593">addTxQueue</a>(<span class="keyword">const</span> <a class="code" href="classripple_1_1base__uint.html">uint256</a>&amp; hash)<span class="keyword"> override</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a9b25cbdbd3e4c69addd2729b3ca2ca4b">queueTx_</a>++;</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; }</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keyword">static</span> <span class="keywordtype">void</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a525067e15f4661adabc5a3ad1c403980"> 135</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a525067e15f4661adabc5a3ad1c403980">init</a>()</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; {</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a9b25cbdbd3e4c69addd2729b3ca2ca4b">queueTx_</a> = 0;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a4271a7682b7b080a6a889794d4c5ea98">sendTx_</a> = 0;</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#abef4d22826e76649b0c27a333718b4fb">sid_</a> = 0;</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; }</div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#abef4d22826e76649b0c27a333718b4fb"> 141</a></span>&#160; <span class="keyword">inline</span> <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#abef4d22826e76649b0c27a333718b4fb">sid_</a> = 0;</div>
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a9b25cbdbd3e4c69addd2729b3ca2ca4b"> 142</a></span>&#160; <span class="keyword">inline</span> <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a9b25cbdbd3e4c69addd2729b3ca2ca4b">queueTx_</a> = 0;</div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a4271a7682b7b080a6a889794d4c5ea98"> 143</a></span>&#160; <span class="keyword">inline</span> <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a4271a7682b7b080a6a889794d4c5ea98">sendTx_</a> = 0;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; };</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ae3d405bde4503426807119e8e032e3dc"> 146</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ae3d405bde4503426807119e8e032e3dc">lid_</a>{0};</div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a999787b86216dbcc4c054218c580be33"> 147</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a999787b86216dbcc4c054218c580be33">rid_</a>{1};</div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a43a7499e0048172096f47092bf9fc7d7"> 148</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">shared_context</a> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a43a7499e0048172096f47092bf9fc7d7">context_</a>;</div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a28b0b01ad5a1999d39a0a03cf0c145a9"> 149</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/pair.html">ProtocolVersion</a> <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a28b0b01ad5a1999d39a0a03cf0c145a9">protocolVersion_</a>;</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#adeee74f6d6b8ba6c3cbb149e8678ff22"> 150</a></span>&#160; boost::beast::multi_buffer <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#adeee74f6d6b8ba6c3cbb149e8678ff22">read_buf_</a>;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; </div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#af624cda40dd8f959e1b874d0611c8955"> 153</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#af624cda40dd8f959e1b874d0611c8955">tx_reduce_relay_test</a>()</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; : <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a43a7499e0048172096f47092bf9fc7d7">context_</a>(<a class="code" href="namespaceripple.html#a4d435c32e5733f8d57bf0562c25e0f3b">make_SSLContext</a>(<span class="stringliteral">&quot;&quot;</span>)), <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a28b0b01ad5a1999d39a0a03cf0c145a9">protocolVersion_</a>{1, 7}</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; {</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; }</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a4337a4227170e18714d44e0995ad1de5"> 160</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a4337a4227170e18714d44e0995ad1de5">addPeer</a>(</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <a class="code" href="classripple_1_1test_1_1jtx_1_1Env.html">jtx::Env</a>&amp; env,</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;PeerTest&gt;</a>&gt;&amp; peers,</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a>&amp; nDisabled)</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; {</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keyword">auto</span>&amp; overlay = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classripple_1_1OverlayImpl.html">OverlayImpl</a>&amp;<span class="keyword">&gt;</span>(env.<a class="code" href="classripple_1_1test_1_1jtx_1_1Env.html#a9e55bbdb66a785bfd0dda93802b514b6">app</a>().<a class="code" href="classripple_1_1Application.html#a0511c5e849c6735036d4667a72ff01ee">overlay</a>());</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; boost::beast::http::request&lt;boost::beast::http::dynamic_body&gt; request;</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; (nDisabled == 0)</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; ? (<span class="keywordtype">void</span>)request.insert(</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="stringliteral">&quot;X-Protocol-Ctl&quot;</span>,</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <a class="code" href="namespaceripple.html#a3b64d9e22ab9ae2c1f8957809f69d9b0">makeFeaturesRequestHeader</a>(<span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">true</span>, <span class="keyword">false</span>))</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; : (<span class="keywordtype">void</span>)nDisabled--;</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="keyword">auto</span> stream_ptr = std::make_unique&lt;stream_type&gt;(</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#af2a877271fc33abaefcd7aa68d9050c0">socket_type</a>(std::forward&lt;boost::asio::io_service&amp;&gt;(</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; env.<a class="code" href="classripple_1_1test_1_1jtx_1_1Env.html#a9e55bbdb66a785bfd0dda93802b514b6">app</a>().<a class="code" href="classripple_1_1Application.html#aeb96811d5ac7f90cf0736a5874aa55e9">getIOService</a>())),</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; *<a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a43a7499e0048172096f47092bf9fc7d7">context_</a>);</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <a class="code" href="classbeast_1_1IP_1_1Endpoint.html">beast::IP::Endpoint</a> local(</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; beast::IP::Address::from_string(<span class="stringliteral">&quot;172.1.1.&quot;</span> + <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(<a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ae3d405bde4503426807119e8e032e3dc">lid_</a>)));</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <a class="code" href="classbeast_1_1IP_1_1Endpoint.html">beast::IP::Endpoint</a> remote(</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; beast::IP::Address::from_string(<span class="stringliteral">&quot;172.1.1.&quot;</span> + <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a>(<a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a999787b86216dbcc4c054218c580be33">rid_</a>)));</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <a class="code" href="classripple_1_1PublicKey.html">PublicKey</a> key(std::get&lt;0&gt;(<a class="code" href="namespaceripple.html#ac52a0a522fc11bdd47fce39bd29f97bc">randomKeyPair</a>(<a class="code" href="namespaceripple.html#a9de744cfdefe1132969eb982e57e4ddea8183aa2c95dc1385c8f58bf1917fcb0b">KeyType::ed25519</a>)));</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="keyword">auto</span> consumer = overlay.resourceManager().newInboundEndpoint(remote);</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="keyword">auto</span> slot = overlay.peerFinder().new_inbound_slot(local, remote);</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> peer = std::make_shared&lt;PeerTest&gt;(</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; env.<a class="code" href="classripple_1_1test_1_1jtx_1_1Env.html#a9e55bbdb66a785bfd0dda93802b514b6">app</a>(),</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; slot,</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; std::move(request),</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; key,</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a28b0b01ad5a1999d39a0a03cf0c145a9">protocolVersion_</a>,</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; consumer,</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; std::move(stream_ptr),</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; overlay);</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; overlay.add_active(peer);</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; peers.emplace_back(peer); <span class="comment">// overlay stores week ptr to PeerImp</span></div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ae3d405bde4503426807119e8e032e3dc">lid_</a> += 2;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a999787b86216dbcc4c054218c580be33">rid_</a> += 2;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; assert(<a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ae3d405bde4503426807119e8e032e3dc">lid_</a> &lt;= 254);</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; }</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055"> 200</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; test,</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="keywordtype">bool</span> txRREnabled,</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> nPeers,</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> nDisabled,</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> minPeers,</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> relayPercentage,</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> expectRelay,</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> expectQueue,</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set&lt;Peer::id_t&gt;</a> <span class="keyword">const</span>&amp; toSkip = {})</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; {</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; testcase(test);</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <a class="code" href="classripple_1_1test_1_1jtx_1_1Env.html">jtx::Env</a> env(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::shared_ptr&lt;PeerTest&gt;</a>&gt; peers;</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; env.app().config().TX_REDUCE_RELAY_ENABLE = txRREnabled;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; env.app().config().TX_REDUCE_RELAY_MIN_PEERS = minPeers;</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; env.app().config().TX_RELAY_PERCENTAGE = relayPercentage;</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a525067e15f4661adabc5a3ad1c403980">PeerTest::init</a>();</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ae3d405bde4503426807119e8e032e3dc">lid_</a> = 0;</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a999787b86216dbcc4c054218c580be33">rid_</a> = 0;</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; nPeers; i++)</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a4337a4227170e18714d44e0995ad1de5">addPeer</a>(env, peers, nDisabled);</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; protocol::TMTransaction m;</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; m.set_rawtransaction(<span class="stringliteral">&quot;transaction&quot;</span>);</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; m.set_deferred(<span class="keyword">false</span>);</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; m.set_status(protocol::TransactionStatus::tsNEW);</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; env.app().overlay().relay(<a class="code" href="classripple_1_1base__uint.html">uint256</a>{0}, m, toSkip);</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; BEAST_EXPECT(</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a4271a7682b7b080a6a889794d4c5ea98">PeerTest::sendTx_</a> == expectRelay &amp;&amp;</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a9b25cbdbd3e4c69addd2729b3ca2ca4b">PeerTest::queueTx_</a> == expectQueue);</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; }</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ad6ef89670e7271284a99b29480dd3a33"> 233</a></span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ad6ef89670e7271284a99b29480dd3a33">run</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="keywordtype">bool</span> log = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set&lt;Peer::id_t&gt;</a> skip = {0, 1, 2, 3, 4};</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a530e0d78db55737f7b05e99af5dedb34">testConfig</a>(log);</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="comment">// relay to all peers, no hash queue</span></div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;feature disabled&quot;</span>, <span class="keyword">false</span>, 10, 0, 10, 25, 10, 0);</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="comment">// relay to nPeers - skip (10-5=5)</span></div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;feature disabled &amp; skip&quot;</span>, <span class="keyword">false</span>, 10, 0, 10, 25, 5, 0, skip);</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <span class="comment">// relay to all peers because min is greater than nPeers</span></div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;relay all 1&quot;</span>, <span class="keyword">true</span>, 10, 0, 20, 25, 10, 0);</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="comment">// relay to all peers because min + disabled is greater thant nPeers</span></div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;relay all 2&quot;</span>, <span class="keyword">true</span>, 20, 15, 10, 25, 20, 0);</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="comment">// relay to minPeers + 25% of nPeers-minPeers (20+0.25*(60-20)=30),</span></div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; <span class="comment">// queue the rest (30)</span></div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;relay &amp; queue&quot;</span>, <span class="keyword">true</span>, 60, 0, 20, 25, 30, 30);</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <span class="comment">// relay to minPeers + 25% of (nPeers - nPeers) - skip</span></div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <span class="comment">// (20+0.25*(60-20)-5=25), queue the rest, skip counts towards relayed</span></div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="comment">// (60-25-5=30)</span></div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;skip&quot;</span>, <span class="keyword">true</span>, 60, 0, 20, 25, 25, 30, skip);</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <span class="comment">// relay to minPeers + disabled + 25% of (nPeers - minPeers - disalbed)</span></div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="comment">// (20+10+0.25*(70-20-10)=40), queue the rest (30)</span></div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;disabled&quot;</span>, <span class="keyword">true</span>, 70, 10, 20, 25, 40, 30);</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="comment">// relay to minPeers + disabled-not-in-skip + 25% of (nPeers - minPeers</span></div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <span class="comment">// - disabled) (20+5+0.25*(70-20-10)=35), queue the rest, skip counts</span></div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <span class="comment">// towards relayed (70-35-5=30))</span></div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;disabled &amp; skip&quot;</span>, <span class="keyword">true</span>, 70, 10, 20, 25, 35, 30, skip);</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; <span class="comment">// relay to minPeers + disabled + 25% of (nPeers - minPeers - disabled)</span></div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; <span class="comment">// - skip (10+5+0.25*(15-10-5)-10=5), queue the rest, skip counts</span></div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="comment">// towards relayed (15-5-10=0)</span></div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; skip = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;disabled &amp; skip, no queue&quot;</span>, <span class="keyword">true</span>, 15, 5, 10, 25, 5, 0, skip);</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="comment">// relay to minPeers + disabled + 25% of (nPeers - minPeers - disabled)</span></div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="comment">// - skip (10+2+0.25*(20-10-2)-14=0), queue the rest, skip counts</span></div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="comment">// towards relayed (20-14=6)</span></div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; skip = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">&quot;disabled &amp; skip, no relay&quot;</span>, <span class="keyword">true</span>, 20, 2, 10, 25, 0, 6, skip);</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; }</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;};</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; </div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;<a class="code" href="namespaceripple_1_1test.html#a36e90e9cdf2adf7993483b3190ee8e21">BEAST_DEFINE_TESTSUITE</a>(tx_reduce_relay, ripple_data, <a class="code" href="namespaceripple.html">ripple</a>);</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;} <span class="comment">// namespace test</span></div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;} <span class="comment">// namespace ripple</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html_a9b25cbdbd3e4c69addd2729b3ca2ca4b"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a9b25cbdbd3e4c69addd2729b3ca2ca4b">ripple::test::tx_reduce_relay_test::PeerTest::queueTx_</a></div><div class="ttdeci">static std::uint16_t queueTx_</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00142">tx_reduce_relay_test.cpp:142</a></div></div>
<div class="ttc" id="aclassripple_1_1Application_html"><div class="ttname"><a href="classripple_1_1Application.html">ripple::Application</a></div><div class="ttdef"><b>Definition:</b> <a href="Application_8h_source.html#l00115">Application.h:115</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_a4337a4227170e18714d44e0995ad1de5"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#a4337a4227170e18714d44e0995ad1de5">ripple::test::tx_reduce_relay_test::addPeer</a></div><div class="ttdeci">void addPeer(jtx::Env &amp;env, std::vector&lt; std::shared_ptr&lt; PeerTest &gt;&gt; &amp;peers, std::uint16_t &amp;nDisabled)</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00160">tx_reduce_relay_test.cpp:160</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_ad6ef89670e7271284a99b29480dd3a33"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#ad6ef89670e7271284a99b29480dd3a33">ripple::test::tx_reduce_relay_test::run</a></div><div class="ttdeci">void run() override</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00233">tx_reduce_relay_test.cpp:233</a></div></div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="ashared_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt; boost::asio::ssl::context &gt;</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html_a3f5b05ae02ef643a45f7f39db8565298"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a3f5b05ae02ef643a45f7f39db8565298">ripple::test::tx_reduce_relay_test::PeerTest::run</a></div><div class="ttdeci">void run() override</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00121">tx_reduce_relay_test.cpp:121</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_af2a877271fc33abaefcd7aa68d9050c0"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#af2a877271fc33abaefcd7aa68d9050c0">ripple::test::tx_reduce_relay_test::socket_type</a></div><div class="ttdeci">boost::asio::ip::tcp::socket socket_type</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00033">tx_reduce_relay_test.cpp:33</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_a28b0b01ad5a1999d39a0a03cf0c145a9"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#a28b0b01ad5a1999d39a0a03cf0c145a9">ripple::test::tx_reduce_relay_test::protocolVersion_</a></div><div class="ttdeci">ProtocolVersion protocolVersion_</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00149">tx_reduce_relay_test.cpp:149</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="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="anamespaceripple_html_a3b64d9e22ab9ae2c1f8957809f69d9b0"><div class="ttname"><a href="namespaceripple.html#a3b64d9e22ab9ae2c1f8957809f69d9b0">ripple::makeFeaturesRequestHeader</a></div><div class="ttdeci">std::string makeFeaturesRequestHeader(bool comprEnabled, bool ledgerReplayEnabled, bool txReduceRelayEnabled, bool vpReduceRelayEnabled)</div><div class="ttdoc">Make request header X-Protocol-Ctl value with supported features.</div><div class="ttdef"><b>Definition:</b> <a href="Handshake_8cpp_source.html#l00074">Handshake.cpp:74</a></div></div>
<div class="ttc" id="anamespaceripple_html_a4d435c32e5733f8d57bf0562c25e0f3b"><div class="ttname"><a href="namespaceripple.html#a4d435c32e5733f8d57bf0562c25e0f3b">ripple::make_SSLContext</a></div><div class="ttdeci">std::shared_ptr&lt; boost::asio::ssl::context &gt; make_SSLContext(std::string const &amp;cipherList)</div><div class="ttdoc">Create a self-signed SSL context that allows anonymous Diffie Hellman.</div><div class="ttdef"><b>Definition:</b> <a href="make__SSLContext_8cpp_source.html#l00361">make_SSLContext.cpp:361</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html_a9f00f294be4b8bcc2e63eafa2d6c0593"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a9f00f294be4b8bcc2e63eafa2d6c0593">ripple::test::tx_reduce_relay_test::PeerTest::addTxQueue</a></div><div class="ttdeci">void addTxQueue(const uint256 &amp;hash) override</div><div class="ttdoc">Aggregate transaction's hash.</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00130">tx_reduce_relay_test.cpp:130</a></div></div>
<div class="ttc" id="abasic_stringstream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_stringstream.html">std::stringstream</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="aclassripple_1_1PeerImp_html_a96c66532d142fa63764aadffbfc6fe88"><div class="ttname"><a href="classripple_1_1PeerImp.html#a96c66532d142fa63764aadffbfc6fe88">ripple::PeerImp::slot</a></div><div class="ttdeci">std::shared_ptr&lt; PeerFinder::Slot &gt; const &amp; slot()</div><div class="ttdef"><b>Definition:</b> <a href="PeerImp_8h_source.html#l00260">PeerImp.h:260</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_a051d4e26e1050b71288e4239b371c055"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">ripple::test::tx_reduce_relay_test::testRelay</a></div><div class="ttdeci">void testRelay(std::string const &amp;test, bool txRREnabled, std::uint16_t nPeers, std::uint16_t nDisabled, std::uint16_t minPeers, std::uint16_t relayPercentage, std::uint16_t expectRelay, std::uint16_t expectQueue, std::set&lt; Peer::id_t &gt; const &amp;toSkip={})</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00200">tx_reduce_relay_test.cpp:200</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1jtx_1_1Env_html_a9e55bbdb66a785bfd0dda93802b514b6"><div class="ttname"><a href="classripple_1_1test_1_1jtx_1_1Env.html#a9e55bbdb66a785bfd0dda93802b514b6">ripple::test::jtx::Env::app</a></div><div class="ttdeci">Application &amp; app()</div><div class="ttdef"><b>Definition:</b> <a href="Env_8h_source.html#l00241">Env.h:241</a></div></div>
<div class="ttc" id="afunction_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_a530e0d78db55737f7b05e99af5dedb34"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#a530e0d78db55737f7b05e99af5dedb34">ripple::test::tx_reduce_relay_test::testConfig</a></div><div class="ttdeci">void testConfig(bool log)</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00047">tx_reduce_relay_test.cpp:47</a></div></div>
<div class="ttc" id="aclassripple_1_1PeerImp_html"><div class="ttname"><a href="classripple_1_1PeerImp.html">ripple::PeerImp</a></div><div class="ttdef"><b>Definition:</b> <a href="PeerImp_8h_source.html#l00052">PeerImp.h:52</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_ac61a0165aaf8a9ccd5f6c2f43b807fd6"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#ac61a0165aaf8a9ccd5f6c2f43b807fd6">ripple::test::tx_reduce_relay_test::stream_type</a></div><div class="ttdeci">boost::beast::ssl_stream&lt; middle_type &gt; stream_type</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00035">tx_reduce_relay_test.cpp:35</a></div></div>
<div class="ttc" id="anamespaceripple_html_a9de744cfdefe1132969eb982e57e4ddea8183aa2c95dc1385c8f58bf1917fcb0b"><div class="ttname"><a href="namespaceripple.html#a9de744cfdefe1132969eb982e57e4ddea8183aa2c95dc1385c8f58bf1917fcb0b">ripple::KeyType::ed25519</a></div><div class="ttdeci">@ ed25519</div></div>
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint&lt; 256 &gt;</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_af624cda40dd8f959e1b874d0611c8955"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#af624cda40dd8f959e1b874d0611c8955">ripple::test::tx_reduce_relay_test::tx_reduce_relay_test</a></div><div class="ttdeci">tx_reduce_relay_test()</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00153">tx_reduce_relay_test.cpp:153</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html_abef4d22826e76649b0c27a333718b4fb"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#abef4d22826e76649b0c27a333718b4fb">ripple::test::tx_reduce_relay_test::PeerTest::sid_</a></div><div class="ttdeci">static std::size_t sid_</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00141">tx_reduce_relay_test.cpp:141</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_a9a3a05f3e2b91625530437f43e5ec241"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#a9a3a05f3e2b91625530437f43e5ec241">ripple::test::tx_reduce_relay_test::middle_type</a></div><div class="ttdeci">boost::beast::tcp_stream middle_type</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00034">tx_reduce_relay_test.cpp:34</a></div></div>
<div class="ttc" id="aclassripple_1_1Config_html_acec216c5b37b6d4ac971e1ff62142963"><div class="ttname"><a href="classripple_1_1Config.html#acec216c5b37b6d4ac971e1ff62142963">ripple::Config::loadFromString</a></div><div class="ttdeci">void loadFromString(std::string const &amp;fileContents)</div><div class="ttdoc">Load the config from the contents of the string.</div><div class="ttdef"><b>Definition:</b> <a href="Config_8cpp_source.html#l00458">Config.cpp:458</a></div></div>
<div class="ttc" id="aclassripple_1_1PublicKey_html"><div class="ttname"><a href="classripple_1_1PublicKey.html">ripple::PublicKey</a></div><div class="ttdoc">A public key.</div><div class="ttdef"><b>Definition:</b> <a href="PublicKey_8h_source.html#l00059">PublicKey.h:59</a></div></div>
<div class="ttc" id="aclassripple_1_1Config_html"><div class="ttname"><a href="classripple_1_1Config.html">ripple::Config</a></div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00069">Config.h:69</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_adeee74f6d6b8ba6c3cbb149e8678ff22"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#adeee74f6d6b8ba6c3cbb149e8678ff22">ripple::test::tx_reduce_relay_test::read_buf_</a></div><div class="ttdeci">boost::beast::multi_buffer read_buf_</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00150">tx_reduce_relay_test.cpp:150</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_a999787b86216dbcc4c054218c580be33"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#a999787b86216dbcc4c054218c580be33">ripple::test::tx_reduce_relay_test::rid_</a></div><div class="ttdeci">std::uint16_t rid_</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00147">tx_reduce_relay_test.cpp:147</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_ae3d405bde4503426807119e8e032e3dc"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#ae3d405bde4503426807119e8e032e3dc">ripple::test::tx_reduce_relay_test::lid_</a></div><div class="ttdeci">std::uint16_t lid_</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00146">tx_reduce_relay_test.cpp:146</a></div></div>
<div class="ttc" id="ato_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a></div><div class="ttdeci">T to_string(T... args)</div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html_a377cd0c70b2399f6a1e256ef08748329"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a377cd0c70b2399f6a1e256ef08748329">ripple::test::tx_reduce_relay_test::PeerTest::~PeerTest</a></div><div class="ttdeci">~PeerTest()=default</div></div>
<div class="ttc" id="ainteger_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_a43a7499e0048172096f47092bf9fc7d7"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#a43a7499e0048172096f47092bf9fc7d7">ripple::test::tx_reduce_relay_test::context_</a></div><div class="ttdeci">shared_context context_</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00148">tx_reduce_relay_test.cpp:148</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html_a525067e15f4661adabc5a3ad1c403980"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a525067e15f4661adabc5a3ad1c403980">ripple::test::tx_reduce_relay_test::PeerTest::init</a></div><div class="ttdeci">static void init()</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00135">tx_reduce_relay_test.cpp:135</a></div></div>
<div class="ttc" id="aclassripple_1_1Application_html_aeb96811d5ac7f90cf0736a5874aa55e9"><div class="ttname"><a href="classripple_1_1Application.html#aeb96811d5ac7f90cf0736a5874aa55e9">ripple::Application::getIOService</a></div><div class="ttdeci">virtual boost::asio::io_service &amp; getIOService()=0</div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html">ripple::test::tx_reduce_relay_test::PeerTest</a></div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00093">tx_reduce_relay_test.cpp:93</a></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&lt; PublicKey, SecretKey &gt; 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#l00368">SecretKey.cpp:368</a></div></div>
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="RCLCensorshipDetector_8h_source.html#l00029">RCLCensorshipDetector.h:29</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html_abf00c4c037bee14646856abe64441cbb"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#abf00c4c037bee14646856abe64441cbb">ripple::test::tx_reduce_relay_test::PeerTest::PeerTest</a></div><div class="ttdeci">PeerTest(Application &amp;app, std::shared_ptr&lt; PeerFinder::Slot &gt; const &amp;slot, http_request_type &amp;&amp;request, PublicKey const &amp;publicKey, ProtocolVersion protocol, Resource::Consumer consumer, std::unique_ptr&lt; tx_reduce_relay_test::stream_type &gt; &amp;&amp;stream_ptr, OverlayImpl &amp;overlay)</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00096">tx_reduce_relay_test.cpp:96</a></div></div>
<div class="ttc" id="anamespaceprotocol_html"><div class="ttname"><a href="namespaceprotocol.html">protocol</a></div><div class="ttdef"><b>Definition:</b> <a href="ValidatorList_8h_source.html#l00038">ValidatorList.h:38</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html">ripple::test::tx_reduce_relay_test</a></div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00030">tx_reduce_relay_test.cpp:30</a></div></div>
<div class="ttc" id="aclassripple_1_1Config_html_a571b13011e10271dd2c5c010106389d8"><div class="ttname"><a href="classripple_1_1Config.html#a571b13011e10271dd2c5c010106389d8">ripple::Config::TX_REDUCE_RELAY_MIN_PEERS</a></div><div class="ttdeci">std::size_t TX_REDUCE_RELAY_MIN_PEERS</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00254">Config.h:254</a></div></div>
<div class="ttc" id="aclassripple_1_1Config_html_a9433d2b86e6e37bfcec0066ba608d354"><div class="ttname"><a href="classripple_1_1Config.html#a9433d2b86e6e37bfcec0066ba608d354">ripple::Config::TX_REDUCE_RELAY_METRICS</a></div><div class="ttdeci">bool TX_REDUCE_RELAY_METRICS</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00251">Config.h:251</a></div></div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace.</div></div>
<div class="ttc" id="aclassripple_1_1Resource_1_1Consumer_html"><div class="ttname"><a href="classripple_1_1Resource_1_1Consumer.html">ripple::Resource::Consumer</a></div><div class="ttdoc">An endpoint that consumes resources.</div><div class="ttdef"><b>Definition:</b> <a href="Consumer_8h_source.html#l00034">Consumer.h:34</a></div></div>
<div class="ttc" id="aclassripple_1_1Application_html_a0511c5e849c6735036d4667a72ff01ee"><div class="ttname"><a href="classripple_1_1Application.html#a0511c5e849c6735036d4667a72ff01ee">ripple::Application::overlay</a></div><div class="ttdeci">virtual Overlay &amp; overlay()=0</div></div>
<div class="ttc" id="astr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_stringstream/str.html">std::stringstream::str</a></div><div class="ttdeci">T str(T... args)</div></div>
<div class="ttc" id="asize_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html_a8acefb03a28d2d12b5d56f59a3b77905"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a8acefb03a28d2d12b5d56f59a3b77905">ripple::test::tx_reduce_relay_test::PeerTest::send</a></div><div class="ttdeci">void send(std::shared_ptr&lt; Message &gt; const &amp;) override</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00125">tx_reduce_relay_test.cpp:125</a></div></div>
<div class="ttc" id="aclassripple_1_1Config_html_aa03bee9cf3f844d3539a85fbc2a9184a"><div class="ttname"><a href="classripple_1_1Config.html#aa03bee9cf3f844d3539a85fbc2a9184a">ripple::Config::TX_RELAY_PERCENTAGE</a></div><div class="ttdeci">std::size_t TX_RELAY_PERCENTAGE</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00257">Config.h:257</a></div></div>
<div class="ttc" id="aclassbeast_1_1IP_1_1Endpoint_html"><div class="ttname"><a href="classbeast_1_1IP_1_1Endpoint.html">beast::IP::Endpoint</a></div><div class="ttdoc">A version-independent IP address and port combination.</div><div class="ttdef"><b>Definition:</b> <a href="IPEndpoint_8h_source.html#l00038">IPEndpoint.h:38</a></div></div>
<div class="ttc" id="aclassripple_1_1Config_html_a83ff989bc69d931321cc8efaecbb1c0c"><div class="ttname"><a href="classripple_1_1Config.html#a83ff989bc69d931321cc8efaecbb1c0c">ripple::Config::TX_REDUCE_RELAY_ENABLE</a></div><div class="ttdeci">bool TX_REDUCE_RELAY_ENABLE</div><div class="ttdef"><b>Definition:</b> <a href="Config_8h_source.html#l00244">Config.h:244</a></div></div>
<div class="ttc" id="aclassripple_1_1OverlayImpl_html"><div class="ttname"><a href="classripple_1_1OverlayImpl.html">ripple::OverlayImpl</a></div><div class="ttdef"><b>Definition:</b> <a href="OverlayImpl_8h_source.html#l00058">OverlayImpl.h:58</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest_html_a4271a7682b7b080a6a889794d4c5ea98"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a4271a7682b7b080a6a889794d4c5ea98">ripple::test::tx_reduce_relay_test::PeerTest::sendTx_</a></div><div class="ttdeci">static std::uint16_t sendTx_</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00143">tx_reduce_relay_test.cpp:143</a></div></div>
<div class="ttc" id="aclassripple_1_1test_1_1tx__reduce__relay__test_html_a13548c221c573b096129053c50ead434"><div class="ttname"><a href="classripple_1_1test_1_1tx__reduce__relay__test.html#a13548c221c573b096129053c50ead434">ripple::test::tx_reduce_relay_test::doTest</a></div><div class="ttdeci">void doTest(const std::string &amp;msg, bool log, std::function&lt; void(bool)&gt; f)</div><div class="ttdef"><b>Definition:</b> <a href="tx__reduce__relay__test_8cpp_source.html#l00040">tx_reduce_relay_test.cpp:40</a></div></div>
<div class="ttc" id="anamespaceripple_html_aa265217edeb8282e636c78b50049f4c0"><div class="ttname"><a href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">ripple::http_request_type</a></div><div class="ttdeci">boost::beast::http::request&lt; boost::beast::http::dynamic_body &gt; http_request_type</div><div class="ttdef"><b>Definition:</b> <a href="Handshake_8h_source.html#l00047">Handshake.h:47</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="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_1test_1_1jtx_1_1Env_html"><div class="ttname"><a href="classripple_1_1test_1_1jtx_1_1Env.html">ripple::test::jtx::Env</a></div><div class="ttdoc">A transaction testing environment.</div><div class="ttdef"><b>Definition:</b> <a href="Env_8h_source.html#l00116">Env.h:116</a></div></div>
<div class="ttc" id="anamespaceripple_1_1test_html_a36e90e9cdf2adf7993483b3190ee8e21"><div class="ttname"><a href="namespaceripple_1_1test.html#a36e90e9cdf2adf7993483b3190ee8e21">ripple::test::BEAST_DEFINE_TESTSUITE</a></div><div class="ttdeci">BEAST_DEFINE_TESTSUITE(DeliverMin, app, ripple)</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>