mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
deploy: 020b285808
This commit is contained in:
225
peerfinder_2impl_2Tuning_8h_source.html
Normal file
225
peerfinder_2impl_2Tuning_8h_source.html
Normal file
@@ -0,0 +1,225 @@
|
||||
<!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: Tuning.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">rippled
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.17 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_df9c78dcf3f59a33b12284f95992a64b.html">ripple</a></li><li class="navelem"><a class="el" href="dir_44aff85a5b558cac9311bb222eb8fa78.html">peerfinder</a></li><li class="navelem"><a class="el" href="dir_01f812eedbcff88039c2ca147e9e73a6.html">impl</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">peerfinder/impl/Tuning.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">/*</span></div>
|
||||
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> This file is part of rippled: https://github.com/ripple/rippled</span></div>
|
||||
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Copyright (c) 2012, 2013 Ripple Labs Inc.</span></div>
|
||||
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"></span> </div>
|
||||
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> Permission to use, copy, modify, and/or distribute this software for any</span></div>
|
||||
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> purpose with or without fee is hereby granted, provided that the above</span></div>
|
||||
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> copyright notice and this permission notice appear in all copies.</span></div>
|
||||
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span> </div>
|
||||
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></div>
|
||||
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></div>
|
||||
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></div>
|
||||
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></div>
|
||||
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></div>
|
||||
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></div>
|
||||
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></div>
|
||||
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">*/</span></div>
|
||||
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">//==============================================================================</span></div>
|
||||
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  </div>
|
||||
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#ifndef RIPPLE_PEERFINDER_TUNING_H_INCLUDED</span></div>
|
||||
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#define RIPPLE_PEERFINDER_TUNING_H_INCLUDED</span></div>
|
||||
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  </div>
|
||||
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/array.html">array</a>></span></div>
|
||||
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
|
||||
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">namespace </span>PeerFinder {</div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  </div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html"> 30</a></span> <span class="keyword">namespace </span>Tuning {</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">enum</span></div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> {</div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="comment">//---------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="comment">// Automatic Connection Policy</span></div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="comment">//---------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a55d806cee607bc4ee75497efb6b895f3"> 41</a></span>  <a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a55d806cee607bc4ee75497efb6b895f3">secondsPerConnect</a> = 10</div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  </div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a8a6872ddbb47d7d8ae0223377020d1d1"> 44</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a8a6872ddbb47d7d8ae0223377020d1d1">maxConnectAttempts</a> = 20</div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  </div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a4bdda2a4de62bd1ac3594de895ba3b10"> 51</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a4bdda2a4de62bd1ac3594de895ba3b10">outPercent</a> = 15</div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  </div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946adfb5a5032cadf474a7d73130e7bdfbab"> 57</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946adfb5a5032cadf474a7d73130e7bdfbab">minOutCount</a> = 10</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  </div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946ae2613c88dfdb6971e3738f1f7ef8f295"> 60</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946ae2613c88dfdb6971e3738f1f7ef8f295">defaultMaxPeers</a> = 21</div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  </div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a212731207fffda9c87043e6970a33329"> 66</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a212731207fffda9c87043e6970a33329">maxRedirects</a> = 30</div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> };</div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  </div>
|
||||
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment">// Fixed</span></div>
|
||||
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment">//------------------------------------------------------------------------------</span></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="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/array.html">std::array <int, 10></a> <span class="keyword">const</span> <a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a4395e6f3599d47cada17f80fe10f479c">connectionBackoff</a></div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a4395e6f3599d47cada17f80fe10f479c"> 76</a></span>  {{ 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 }};</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment">// Bootcache</span></div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment">//------------------------------------------------------------------------------</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> <span class="keyword">enum</span></div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> {</div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="comment">// Threshold of cache entries above which we trim.</span></div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#af021a2643b7b5a3db6c40004942a3ba5aa5370251f3b67c6964070abba176411e"> 87</a></span>  <a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#af021a2643b7b5a3db6c40004942a3ba5aa5370251f3b67c6964070abba176411e">bootcacheSize</a> = 1000</div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  </div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="comment">// The percentage of addresses we prune when we trim the cache.</span></div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#af021a2643b7b5a3db6c40004942a3ba5a812b763d40e801379f710816646374fc"> 90</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#af021a2643b7b5a3db6c40004942a3ba5a812b763d40e801379f710816646374fc">bootcachePrunePercent</a> = 10</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"> 93</span> <span class="comment">// The cool down wait between database updates</span></div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// Ideally this should be larger than the time it takes a full</span></div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment">// peer to send us a set of addresses and then disconnect.</span></div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> <span class="keyword">const</span> <a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#ada552bb06c6958020a24fc1341dba2f7">bootcacheCooldownTime</a> (60);</div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  </div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment">// Livecache</span></div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment">//------------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  </div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="keyword">enum</span></div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> {</div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="comment">// Drop incoming messages with hops greater than this number</span></div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30aa83d68d2b1517c949c6cda2eb597c2e6"> 108</a></span>  <a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30aa83d68d2b1517c949c6cda2eb597c2e6">maxHops</a> = 6</div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  </div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="comment">// How many Endpoint to send in each mtENDPOINTS</span></div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a99284827321c3a225668c45de4d5a779"> 111</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a99284827321c3a225668c45de4d5a779">numberOfEndpoints</a> = 2 * <a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30aa83d68d2b1517c949c6cda2eb597c2e6">maxHops</a></div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  </div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="comment">// The most Endpoint we will accept in mtENDPOINTS</span></div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a7117955305a824cfc9b747cd5961b274"> 114</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a7117955305a824cfc9b747cd5961b274">numberOfEndpointsMax</a> = 20</div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  </div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">// The number of peers that we want by default, unless an</span></div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="comment">// explicit value is set in the config file.</span></div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a5b646e3a9bd4d9507b9b5996987083f9"> 118</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a5b646e3a9bd4d9507b9b5996987083f9">defaultMaxPeerCount</a> = 21</div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  </div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a35bdfab4d82d9a91b5fa70a076b88993"> 121</a></span>  ,<a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a35bdfab4d82d9a91b5fa70a076b88993">redirectEndpointCount</a> = 10</div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> };</div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  </div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment">// How often we send or accept mtENDPOINTS messages per peer</span></div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> <span class="keyword">const</span> <a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#ae718e78f5f49e7c578ff30608973a5e9">secondsPerMessage</a> (5);</div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  </div>
|
||||
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="comment">// How long an Endpoint will stay in the cache</span></div>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment">// This should be a small multiple of the broadcast frequency</span></div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> <span class="keyword">const</span> <a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a4a670e377309e85e6651f688f6971bd3">liveCacheSecondsToLive</a> (30);</div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  </div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  </div>
|
||||
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="comment">// How much time to wait before trying an outgoing address again.</span></div>
|
||||
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="comment">// Note that we ignore the port for purposes of comparison.</span></div>
|
||||
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="keyword">static</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> <span class="keyword">const</span> <a class="code" href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aaebd7d6c1b8f1dbbf13e622a28c14b7a">recentAttemptDuration</a> (60);</div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  </div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> }</div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> }</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> }</div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  </div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="preprocessor">#endif</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_a4a670e377309e85e6651f688f6971bd3"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a4a670e377309e85e6651f688f6971bd3">ripple::PeerFinder::Tuning::liveCacheSecondsToLive</a></div><div class="ttdeci">static const std::chrono::seconds liveCacheSecondsToLive(30)</div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_ada552bb06c6958020a24fc1341dba2f7"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#ada552bb06c6958020a24fc1341dba2f7">ripple::PeerFinder::Tuning::bootcacheCooldownTime</a></div><div class="ttdeci">static const std::chrono::seconds bootcacheCooldownTime(60)</div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_aece7fa7a4fd22af031a6aef7ca474946a4bdda2a4de62bd1ac3594de895ba3b10"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a4bdda2a4de62bd1ac3594de895ba3b10">ripple::PeerFinder::Tuning::outPercent</a></div><div class="ttdeci">@ outPercent</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00051">peerfinder/impl/Tuning.h:51</a></div></div>
|
||||
<div class="ttc" id="aduration_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_aece7fa7a4fd22af031a6aef7ca474946a55d806cee607bc4ee75497efb6b895f3"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a55d806cee607bc4ee75497efb6b895f3">ripple::PeerFinder::Tuning::secondsPerConnect</a></div><div class="ttdeci">@ secondsPerConnect</div><div class="ttdoc">Time to wait between making batches of connection attempts.</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00041">peerfinder/impl/Tuning.h:41</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_aece7fa7a4fd22af031a6aef7ca474946adfb5a5032cadf474a7d73130e7bdfbab"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946adfb5a5032cadf474a7d73130e7bdfbab">ripple::PeerFinder::Tuning::minOutCount</a></div><div class="ttdeci">@ minOutCount</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00057">peerfinder/impl/Tuning.h:57</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_a4395e6f3599d47cada17f80fe10f479c"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a4395e6f3599d47cada17f80fe10f479c">ripple::PeerFinder::Tuning::connectionBackoff</a></div><div class="ttdeci">static const std::array< int, 10 > connectionBackoff</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00076">peerfinder/impl/Tuning.h:76</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_af021a2643b7b5a3db6c40004942a3ba5aa5370251f3b67c6964070abba176411e"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#af021a2643b7b5a3db6c40004942a3ba5aa5370251f3b67c6964070abba176411e">ripple::PeerFinder::Tuning::bootcacheSize</a></div><div class="ttdeci">@ bootcacheSize</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00087">peerfinder/impl/Tuning.h:87</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_ae718e78f5f49e7c578ff30608973a5e9"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#ae718e78f5f49e7c578ff30608973a5e9">ripple::PeerFinder::Tuning::secondsPerMessage</a></div><div class="ttdeci">static const std::chrono::seconds secondsPerMessage(5)</div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_aece7fa7a4fd22af031a6aef7ca474946a212731207fffda9c87043e6970a33329"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a212731207fffda9c87043e6970a33329">ripple::PeerFinder::Tuning::maxRedirects</a></div><div class="ttdeci">@ maxRedirects</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00066">peerfinder/impl/Tuning.h:66</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_aaebd7d6c1b8f1dbbf13e622a28c14b7a"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aaebd7d6c1b8f1dbbf13e622a28c14b7a">ripple::PeerFinder::Tuning::recentAttemptDuration</a></div><div class="ttdeci">static const std::chrono::seconds recentAttemptDuration(60)</div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_aece7fa7a4fd22af031a6aef7ca474946a8a6872ddbb47d7d8ae0223377020d1d1"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946a8a6872ddbb47d7d8ae0223377020d1d1">ripple::PeerFinder::Tuning::maxConnectAttempts</a></div><div class="ttdeci">@ maxConnectAttempts</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00044">peerfinder/impl/Tuning.h:44</a></div></div>
|
||||
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/array.html">array</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_a64251435427f33c1f5e7e6da6d63ee30a5b646e3a9bd4d9507b9b5996987083f9"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a5b646e3a9bd4d9507b9b5996987083f9">ripple::PeerFinder::Tuning::defaultMaxPeerCount</a></div><div class="ttdeci">@ defaultMaxPeerCount</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00118">peerfinder/impl/Tuning.h:118</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_a64251435427f33c1f5e7e6da6d63ee30a35bdfab4d82d9a91b5fa70a076b88993"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a35bdfab4d82d9a91b5fa70a076b88993">ripple::PeerFinder::Tuning::redirectEndpointCount</a></div><div class="ttdeci">@ redirectEndpointCount</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00121">peerfinder/impl/Tuning.h:121</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_a64251435427f33c1f5e7e6da6d63ee30a99284827321c3a225668c45de4d5a779"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a99284827321c3a225668c45de4d5a779">ripple::PeerFinder::Tuning::numberOfEndpoints</a></div><div class="ttdeci">@ numberOfEndpoints</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00111">peerfinder/impl/Tuning.h:111</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="anamespaceripple_1_1PeerFinder_1_1Tuning_html_af021a2643b7b5a3db6c40004942a3ba5a812b763d40e801379f710816646374fc"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#af021a2643b7b5a3db6c40004942a3ba5a812b763d40e801379f710816646374fc">ripple::PeerFinder::Tuning::bootcachePrunePercent</a></div><div class="ttdeci">@ bootcachePrunePercent</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00090">peerfinder/impl/Tuning.h:90</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_aece7fa7a4fd22af031a6aef7ca474946ae2613c88dfdb6971e3738f1f7ef8f295"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#aece7fa7a4fd22af031a6aef7ca474946ae2613c88dfdb6971e3738f1f7ef8f295">ripple::PeerFinder::Tuning::defaultMaxPeers</a></div><div class="ttdeci">@ defaultMaxPeers</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00060">peerfinder/impl/Tuning.h:60</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_a64251435427f33c1f5e7e6da6d63ee30a7117955305a824cfc9b747cd5961b274"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30a7117955305a824cfc9b747cd5961b274">ripple::PeerFinder::Tuning::numberOfEndpointsMax</a></div><div class="ttdeci">@ numberOfEndpointsMax</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00114">peerfinder/impl/Tuning.h:114</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_1_1PeerFinder_1_1Tuning_html_a64251435427f33c1f5e7e6da6d63ee30aa83d68d2b1517c949c6cda2eb597c2e6"><div class="ttname"><a href="namespaceripple_1_1PeerFinder_1_1Tuning.html#a64251435427f33c1f5e7e6da6d63ee30aa83d68d2b1517c949c6cda2eb597c2e6">ripple::PeerFinder::Tuning::maxHops</a></div><div class="ttdeci">@ maxHops</div><div class="ttdef"><b>Definition:</b> <a href="peerfinder_2impl_2Tuning_8h_source.html#l00108">peerfinder/impl/Tuning.h:108</a></div></div>
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.17
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user