mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-20 22:31:47 +02:00
generate LeaseSet from tunnel pool
This commit is contained in:
parent
26c5f6cd77
commit
3313a5af5c
4 changed files with 40 additions and 9 deletions
|
@ -21,6 +21,8 @@ namespace tunnel
|
|||
void TunnelPool::TunnelCreated (InboundTunnel * createdTunnel)
|
||||
{
|
||||
m_InboundTunnels.insert (createdTunnel);
|
||||
if (m_Owner)
|
||||
m_Owner->UpdateLeaseSet ();
|
||||
}
|
||||
|
||||
void TunnelPool::TunnelExpired (InboundTunnel * expiredTunnel)
|
||||
|
@ -60,8 +62,9 @@ namespace tunnel
|
|||
new TunnelConfig (std::vector<const i2p::data::RouterInfo *>
|
||||
{
|
||||
firstHop,
|
||||
secondHop,
|
||||
i2p::data::netdb.GetRandomRouter (secondHop)
|
||||
secondHop
|
||||
// TODO: swithc to 3-hops later
|
||||
/*i2p::data::netdb.GetRandomRouter (secondHop) */
|
||||
}),
|
||||
outboundTunnel);
|
||||
tunnel->SetTunnelPool (this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue