|
|
@ -550,11 +550,15 @@ namespace data |
|
|
|
void NetDb::Publish () |
|
|
|
void NetDb::Publish () |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::set<IdentHash> excluded; // TODO: fill up later
|
|
|
|
std::set<IdentHash> excluded; // TODO: fill up later
|
|
|
|
|
|
|
|
for (int i = 0; i < 3; i++) |
|
|
|
|
|
|
|
{ |
|
|
|
auto floodfill = GetClosestFloodfill (i2p::context.GetRouterInfo ().GetIdentHash (), excluded); |
|
|
|
auto floodfill = GetClosestFloodfill (i2p::context.GetRouterInfo ().GetIdentHash (), excluded); |
|
|
|
if (floodfill) |
|
|
|
if (floodfill) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LogPrint ("Publishing our RouterInfo to ", floodfill->GetIdentHashAbbreviation ()); |
|
|
|
LogPrint ("Publishing our RouterInfo to ", floodfill->GetIdentHashAbbreviation ()); |
|
|
|
transports.SendMessage (floodfill->GetIdentHash (), CreateDatabaseStoreMsg ()); |
|
|
|
transports.SendMessage (floodfill->GetIdentHash (), CreateDatabaseStoreMsg ()); |
|
|
|
|
|
|
|
excluded.insert (floodfill->GetIdentHash ()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|