mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 03:55:53 +00:00
420 lines
80 KiB
HTML
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&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_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> <span class="comment">//------------------------------------------------------------------------------</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> This file is part of rippled: https://github.com/ripple/rippled</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Copyright 2020 Ripple Labs Inc.</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> Permission to use, copy, modify, and/or distribute this software for any</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> purpose with or without fee is hereby granted, provided that the above</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> copyright notice and this permission notice appear in all copies.</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">//==============================================================================</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <ripple/basics/make_SSLContext.h></span></div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <ripple/beast/unit_test.h></span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <ripple/overlay/impl/OverlayImpl.h></span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <ripple/overlay/impl/PeerImp.h></span></div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <ripple/peerfinder/impl/SlotImp.h></span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <test/jtx/Env.h></span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  </div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <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>  </div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">namespace </span>test {</div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </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> <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> {</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <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>  <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>  <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>  <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<middle_type>;</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>  <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<boost::asio::ssl::context></a>;</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="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>  <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>& msg, <span class="keywordtype">bool</span> log, <a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a><<span class="keywordtype">void</span>(<span class="keywordtype">bool</span>)> f)</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>  testcase(msg);</div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  f(log);</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>  </div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <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>  <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>  {</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a13548c221c573b096129053c50ead434">doTest</a>(<span class="stringliteral">"Config Test"</span>, log, [&](<span class="keywordtype">bool</span> log) {</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keyword">auto</span> test = [&](<span class="keywordtype">bool</span> enable,</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordtype">bool</span> metrics,</div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <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>  <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>  <span class="keywordtype">bool</span> success = <span class="keyword">true</span>) {</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/io/basic_stringstream.html">std::stringstream</a> str(<span class="stringliteral">"[reduce_relay]"</span>);</div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  str << <span class="stringliteral">"[reduce_relay]\n"</span></div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  << <span class="stringliteral">"tx_enable="</span> << <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(enable) << <span class="stringliteral">"\n"</span></div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  << <span class="stringliteral">"tx_metrics="</span> << <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(metrics) << <span class="stringliteral">"\n"</span></div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  << <span class="stringliteral">"tx_min_peers="</span> << min << <span class="stringliteral">"\n"</span></div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  << <span class="stringliteral">"tx_relay_percentage="</span> << pct << <span class="stringliteral">"\n"</span>;</div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <a class="code" href="classripple_1_1Config.html">Config</a> c;</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordflow">try</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>  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>  </div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  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>  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>  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>  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>  <span class="keywordflow">if</span> (success)</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  pass();</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">else</span></div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  fail();</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>  <span class="keywordflow">catch</span> (...)</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  {</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">if</span> (success)</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  fail();</div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordflow">else</span></div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  pass();</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  };</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  </div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  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>  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>  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>  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>  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>  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>  });</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  }</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  </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>  <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>  {</div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <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>  <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>  <a class="code" href="classripple_1_1Application.html">Application</a>& app,</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<PeerFinder::Slot></a> <span class="keyword">const</span>& <a class="code" href="classripple_1_1PeerImp.html#a96c66532d142fa63764aadffbfc6fe88">slot</a>,</div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="code" href="namespaceripple.html#aa265217edeb8282e636c78b50049f4c0">http_request_type</a>&& request,</div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="classripple_1_1PublicKey.html">PublicKey</a> <span class="keyword">const</span>& publicKey,</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <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>  <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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr<tx_reduce_relay_test::stream_type></a>&& stream_ptr,</div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="classripple_1_1OverlayImpl.html">OverlayImpl</a>& overlay)</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  : <a class="code" href="classripple_1_1PeerImp.html">PeerImp</a>(</div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  app,</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <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>  <a class="code" href="classripple_1_1PeerImp.html#a96c66532d142fa63764aadffbfc6fe88">slot</a>,</div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="namespacestd.html">std</a>::move(request),</div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  publicKey,</div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <a class="code" href="namespaceprotocol.html">protocol</a>,</div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  consumer,</div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <a class="code" href="namespacestd.html">std</a>::move(stream_ptr),</div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  overlay)</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>  <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>  }</div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <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>  </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_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a3f5b05ae02ef643a45f7f39db8565298"> 121</a></span>  <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> <span class="keyword"> </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="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>  <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<Message></a> <span class="keyword">const</span>&)<span class="keyword"> override</span></div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <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>  }</div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <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>  <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>& hash)<span class="keyword"> override</span></div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <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>  }</div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <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>  <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>  {</div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <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>  <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>  <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>  }</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>  <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>  <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>  <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>  };</div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  </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>  <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>  <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>  <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>  <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>  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>  </div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <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>  <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>  : <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">""</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>  {</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>  </div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <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>  <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>  <a class="code" href="classripple_1_1test_1_1jtx_1_1Env.html">jtx::Env</a>& env,</div>
|
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</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/memory/shared_ptr.html">std::shared_ptr<PeerTest></a>>& peers,</div>
|
|
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a>& nDisabled)</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="keyword">auto</span>& overlay = <span class="keyword">dynamic_cast<</span><a class="code" href="classripple_1_1OverlayImpl.html">OverlayImpl</a>&<span class="keyword">></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>  boost::beast::http::request<boost::beast::http::dynamic_body> request;</div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  (nDisabled == 0)</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  ? (<span class="keywordtype">void</span>)request.insert(</div>
|
|
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="stringliteral">"X-Protocol-Ctl"</span>,</div>
|
|
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <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>  : (<span class="keywordtype">void</span>)nDisabled--;</div>
|
|
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keyword">auto</span> stream_ptr = std::make_unique<stream_type>(</div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#af2a877271fc33abaefcd7aa68d9050c0">socket_type</a>(std::forward<boost::asio::io_service&>(</div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</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#aeb96811d5ac7f90cf0736a5874aa55e9">getIOService</a>())),</div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  *<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>  <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>  beast::IP::Address::from_string(<span class="stringliteral">"172.1.1."</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>  <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>  beast::IP::Address::from_string(<span class="stringliteral">"172.1.1."</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>  <a class="code" href="classripple_1_1PublicKey.html">PublicKey</a> key(std::get<0>(<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>  <span class="keyword">auto</span> consumer = overlay.resourceManager().newInboundEndpoint(remote);</div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <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>  <span class="keyword">auto</span> <span class="keyword">const</span> peer = std::make_shared<PeerTest>(</div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  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>  slot,</div>
|
|
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  std::move(request),</div>
|
|
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  key,</div>
|
|
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <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>  consumer,</div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  std::move(stream_ptr),</div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  overlay);</div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  overlay.add_active(peer);</div>
|
|
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  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>  <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>  <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>  assert(<a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#ae3d405bde4503426807119e8e032e3dc">lid_</a> <= 254);</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>  </div>
|
|
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <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>  <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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>& test,</div>
|
|
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordtype">bool</span> txRREnabled,</div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <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>  <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>  <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>  <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>  <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>  <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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<Peer::id_t></a> <span class="keyword">const</span>& toSkip = {})</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>  testcase(test);</div>
|
|
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <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>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::shared_ptr<PeerTest></a>> peers;</div>
|
|
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  env.app().config().TX_REDUCE_RELAY_ENABLE = txRREnabled;</div>
|
|
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  env.app().config().TX_REDUCE_RELAY_MIN_PEERS = minPeers;</div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  env.app().config().TX_RELAY_PERCENTAGE = relayPercentage;</div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <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>  <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>  <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>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < nPeers; i++)</div>
|
|
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <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>  protocol::TMTransaction m;</div>
|
|
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  m.set_rawtransaction(<span class="stringliteral">"transaction"</span>);</div>
|
|
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  m.set_deferred(<span class="keyword">false</span>);</div>
|
|
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  m.set_status(protocol::TransactionStatus::tsNEW);</div>
|
|
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  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>  BEAST_EXPECT(</div>
|
|
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test_1_1PeerTest.html#a4271a7682b7b080a6a889794d4c5ea98">PeerTest::sendTx_</a> == expectRelay &&</div>
|
|
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <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>  }</div>
|
|
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  </div>
|
|
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <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>  <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> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordtype">bool</span> log = <span class="keyword">false</span>;</div>
|
|
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set<Peer::id_t></a> skip = {0, 1, 2, 3, 4};</div>
|
|
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <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>  <span class="comment">// relay to all peers, no hash queue</span></div>
|
|
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"feature disabled"</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>  <span class="comment">// relay to nPeers - skip (10-5=5)</span></div>
|
|
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"feature disabled & skip"</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>  <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>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"relay all 1"</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>  <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>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"relay all 2"</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>  <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>  <span class="comment">// queue the rest (30)</span></div>
|
|
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"relay & queue"</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>  <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>  <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>  <span class="comment">// (60-25-5=30)</span></div>
|
|
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"skip"</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>  <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>  <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>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"disabled"</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>  <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>  <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>  <span class="comment">// towards relayed (70-35-5=30))</span></div>
|
|
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"disabled & skip"</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>  <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>  <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>  <span class="comment">// towards relayed (15-5-10=0)</span></div>
|
|
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  skip = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};</div>
|
|
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"disabled & skip, no queue"</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>  <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>  <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>  <span class="comment">// towards relayed (20-14=6)</span></div>
|
|
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  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>  <a class="code" href="classripple_1_1test_1_1tx__reduce__relay__test.html#a051d4e26e1050b71288e4239b371c055">testRelay</a>(<span class="stringliteral">"disabled & skip, no relay"</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>  }</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> <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> } <span class="comment">// namespace test</span></div>
|
|
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span> } <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 &env, std::vector< std::shared_ptr< PeerTest >> &peers, std::uint16_t &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< boost::asio::ssl::context ></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< boost::asio::ssl::context > make_SSLContext(std::string const &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 &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< PeerFinder::Slot > const & 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 &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< Peer::id_t > const &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 & 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< middle_type > 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< 256 ></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 &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 & 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< 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#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 &app, std::shared_ptr< PeerFinder::Slot > const &slot, http_request_type &&request, PublicKey const &publicKey, ProtocolVersion protocol, Resource::Consumer consumer, std::unique_ptr< tx_reduce_relay_test::stream_type > &&stream_ptr, OverlayImpl &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 & 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< Message > const &) 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 &msg, bool log, std::function< void(bool)> 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< boost::beast::http::dynamic_body > 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  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|