|
|
@ -335,19 +335,25 @@ namespace data |
|
|
|
if (inbound) |
|
|
|
if (inbound) |
|
|
|
{ |
|
|
|
{ |
|
|
|
RequestedDestination * dest = CreateRequestedDestination (destination, isLeaseSet); |
|
|
|
RequestedDestination * dest = CreateRequestedDestination (destination, isLeaseSet); |
|
|
|
|
|
|
|
std::vector<i2p::tunnel::TunnelMessageBlock> msgs; |
|
|
|
|
|
|
|
// request 3 closests floodfills
|
|
|
|
|
|
|
|
for (int i = 0; i < 3; i++) |
|
|
|
|
|
|
|
{ |
|
|
|
auto floodfill = GetClosestFloodfill (destination, dest->GetExcludedPeers ()); |
|
|
|
auto floodfill = GetClosestFloodfill (destination, dest->GetExcludedPeers ()); |
|
|
|
if (floodfill) |
|
|
|
if (floodfill) |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::vector<i2p::tunnel::TunnelMessageBlock> msgs; |
|
|
|
|
|
|
|
// DatabaseLookup message
|
|
|
|
// DatabaseLookup message
|
|
|
|
dest->SetLastOutboundTunnel (outbound); |
|
|
|
|
|
|
|
msgs.push_back (i2p::tunnel::TunnelMessageBlock |
|
|
|
msgs.push_back (i2p::tunnel::TunnelMessageBlock |
|
|
|
{ |
|
|
|
{ |
|
|
|
i2p::tunnel::eDeliveryTypeRouter, |
|
|
|
i2p::tunnel::eDeliveryTypeRouter, |
|
|
|
floodfill->GetIdentHash (), 0, |
|
|
|
floodfill->GetIdentHash (), 0, |
|
|
|
dest->CreateRequestMessage (floodfill, inbound) |
|
|
|
dest->CreateRequestMessage (floodfill, inbound) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (msgs.size () > 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
dest->SetLastOutboundTunnel (outbound); |
|
|
|
outbound->SendTunnelDataMsg (msgs); |
|
|
|
outbound->SendTunnelDataMsg (msgs); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|