MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / SetExplicitPeers

Method SetExplicitPeers

libi2pd/TunnelPool.cpp:71–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 void TunnelPool::SetExplicitPeers (std::vector<i2p::data::IdentHash> explicitPeers)
72 {
73 m_ExplicitPeers.swap (explicitPeers);
74 int size = m_ExplicitPeers.size ();
75 if (size > 0)
76 {
77 if (m_NumInboundHops > size)
78 {
79 m_NumInboundHops = size;
80 LogPrint (eLogInfo, "Tunnels: Inbound tunnel length has been adjusted to ", size, " for explicit peers");
81 }
82 if (m_NumOutboundHops > size)
83 {
84 m_NumOutboundHops = size;
85 LogPrint (eLogInfo, "Tunnels: Outbound tunnel length has been adjusted to ", size, " for explicit peers");
86 }
87 m_NumInboundTunnels = 1;
88 m_NumOutboundTunnels = 1;
89 }
90 }
91
92 void TunnelPool::SetTrustedRouters (std::vector<i2p::data::IdentHash> routers)
93 {

Callers 1

LeaseSetDestinationMethod · 0.80

Calls 1

LogPrintFunction · 0.85

Tested by

no test coverage detected