From 938fa004691ab7a490a54dd55f885239b23e7c21 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 28 Jan 2015 21:01:16 -0500 Subject: [PATCH] publishing with flood --- NetDb.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NetDb.cpp b/NetDb.cpp index 90744fca..6b0a36d0 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -735,13 +735,14 @@ namespace data void NetDb::Publish () { std::set excluded; // TODO: fill up later - for (int i = 0; i < 3; i++) + for (int i = 0; i < 2; i++) { auto floodfill = GetClosestFloodfill (i2p::context.GetRouterInfo ().GetIdentHash (), excluded); if (floodfill) { - LogPrint ("Publishing our RouterInfo to ", floodfill->GetIdentHashAbbreviation ()); - transports.SendMessage (floodfill->GetIdentHash (), CreateDatabaseStoreMsg ()); + uint32_t replyToken = i2p::context.GetRandomNumberGenerator ().GenerateWord32 (); + LogPrint ("Publishing our RouterInfo to ", floodfill->GetIdentHashAbbreviation (), ". reply token=", replyToken); + transports.SendMessage (floodfill->GetIdentHash (), CreateDatabaseStoreMsg ((RouterInfo *)nullptr, replyToken)); excluded.insert (floodfill->GetIdentHash ()); } }