mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-23 17:36:37 +02:00
some cleanup
This commit is contained in:
parent
219abaa7e1
commit
6e32c389b1
2 changed files with 3 additions and 11 deletions
|
@ -749,8 +749,6 @@ namespace util
|
||||||
for (auto it: i2p::tunnel::tunnels.GetOutboundTunnels ())
|
for (auto it: i2p::tunnel::tunnels.GetOutboundTunnels ())
|
||||||
{
|
{
|
||||||
it->GetTunnelConfig ()->Print (s);
|
it->GetTunnelConfig ()->Print (s);
|
||||||
if (it->GetTunnelPool () && !it->GetTunnelPool ()->IsExploratory ())
|
|
||||||
s << " " << "Pool";
|
|
||||||
auto state = it->GetState ();
|
auto state = it->GetState ();
|
||||||
if (state == i2p::tunnel::eTunnelStateFailed)
|
if (state == i2p::tunnel::eTunnelStateFailed)
|
||||||
s << " " << "Failed";
|
s << " " << "Failed";
|
||||||
|
@ -763,8 +761,6 @@ namespace util
|
||||||
for (auto it: i2p::tunnel::tunnels.GetInboundTunnels ())
|
for (auto it: i2p::tunnel::tunnels.GetInboundTunnels ())
|
||||||
{
|
{
|
||||||
it.second->GetTunnelConfig ()->Print (s);
|
it.second->GetTunnelConfig ()->Print (s);
|
||||||
if (it.second->GetTunnelPool () && !it.second->GetTunnelPool ()->IsExploratory ())
|
|
||||||
s << " " << "Pool";
|
|
||||||
auto state = it.second->GetState ();
|
auto state = it.second->GetState ();
|
||||||
if (state == i2p::tunnel::eTunnelStateFailed)
|
if (state == i2p::tunnel::eTunnelStateFailed)
|
||||||
s << " " << "Failed";
|
s << " " << "Failed";
|
||||||
|
|
10
TunnelPool.h
10
TunnelPool.h
|
@ -28,11 +28,8 @@ namespace tunnel
|
||||||
|
|
||||||
TunnelPool (i2p::garlic::GarlicDestination& localDestination, int numInboundHops, int numOutboundHops, int numTunnels = 5);
|
TunnelPool (i2p::garlic::GarlicDestination& localDestination, int numInboundHops, int numOutboundHops, int numTunnels = 5);
|
||||||
~TunnelPool ();
|
~TunnelPool ();
|
||||||
|
|
||||||
const uint8_t * GetEncryptionPrivateKey () const { return m_LocalDestination.GetEncryptionPrivateKey (); };
|
i2p::garlic::GarlicDestination& GetLocalDestination () const { return m_LocalDestination; };
|
||||||
const uint8_t * GetEncryptionPublicKey () const { return m_LocalDestination.GetEncryptionPublicKey (); };
|
|
||||||
i2p::garlic::GarlicDestination& GetLocalDestination () const { return m_LocalDestination; };
|
|
||||||
bool IsExploratory () const { return GetIdentHash () == i2p::context.GetIdentHash (); };
|
|
||||||
|
|
||||||
void CreateTunnels ();
|
void CreateTunnels ();
|
||||||
void TunnelCreated (InboundTunnel * createdTunnel);
|
void TunnelCreated (InboundTunnel * createdTunnel);
|
||||||
|
@ -41,8 +38,7 @@ namespace tunnel
|
||||||
void TunnelExpired (OutboundTunnel * expiredTunnel);
|
void TunnelExpired (OutboundTunnel * expiredTunnel);
|
||||||
std::vector<InboundTunnel *> GetInboundTunnels (int num) const;
|
std::vector<InboundTunnel *> GetInboundTunnels (int num) const;
|
||||||
OutboundTunnel * GetNextOutboundTunnel (OutboundTunnel * suggested = nullptr) const;
|
OutboundTunnel * GetNextOutboundTunnel (OutboundTunnel * suggested = nullptr) const;
|
||||||
InboundTunnel * GetNextInboundTunnel (InboundTunnel * suggested = nullptr) const;
|
InboundTunnel * GetNextInboundTunnel (InboundTunnel * suggested = nullptr) const;
|
||||||
const i2p::data::IdentHash& GetIdentHash () const { return m_LocalDestination.GetIdentHash (); };
|
|
||||||
|
|
||||||
void TestTunnels ();
|
void TestTunnels ();
|
||||||
void ProcessDeliveryStatus (I2NPMessage * msg);
|
void ProcessDeliveryStatus (I2NPMessage * msg);
|
||||||
|
|
Loading…
Add table
Reference in a new issue