|
|
|
@ -56,7 +56,7 @@ namespace llarp
|
|
|
|
|
llarp_dht_context *ctx,
|
|
|
|
|
std::vector< std::unique_ptr< IMessage > > &replies) const
|
|
|
|
|
{
|
|
|
|
|
auto now = ctx->impl->Now();
|
|
|
|
|
auto now = ctx->impl->Now();
|
|
|
|
|
const auto keyStr = introset.derivedSigningKey.ToHex();
|
|
|
|
|
|
|
|
|
|
auto &dht = *ctx->impl;
|
|
|
|
@ -82,7 +82,8 @@ namespace llarp
|
|
|
|
|
|
|
|
|
|
// identify closest 4 routers
|
|
|
|
|
static constexpr size_t StorageRedundancy = 4;
|
|
|
|
|
auto closestRCs = dht.GetRouter()->nodedb()->FindClosestTo(addr, StorageRedundancy);
|
|
|
|
|
auto closestRCs =
|
|
|
|
|
dht.GetRouter()->nodedb()->FindClosestTo(addr, StorageRedundancy);
|
|
|
|
|
if(closestRCs.size() != StorageRedundancy)
|
|
|
|
|
{
|
|
|
|
|
llarp::LogWarn("Received PublishIntroMessage but only know ",
|
|
|
|
@ -135,7 +136,7 @@ namespace llarp
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
int candidateNumber = -1;
|
|
|
|
|
int index = 0;
|
|
|
|
|
int index = 0;
|
|
|
|
|
for(const auto &rc : closestRCs)
|
|
|
|
|
{
|
|
|
|
|
if(rc.pubkey == dht.OurKey())
|
|
|
|
|