mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
limit replies on introset lookup, pick newest
This commit is contained in:
parent
e623e6fdb5
commit
ba8313e57e
@ -80,7 +80,16 @@ namespace llarp
|
||||
{
|
||||
handleResult(valuesFound);
|
||||
}
|
||||
|
||||
// get newest introset
|
||||
if(valuesFound.size() > 1)
|
||||
{
|
||||
IntroSet found;
|
||||
for(const auto & introset : valuesFound)
|
||||
if(found.OtherIsNewer(introset))
|
||||
found = introset;
|
||||
valuesFound.clear();
|
||||
valuesFound.emplace_back(found);
|
||||
}
|
||||
parent->DHTSendTo(whoasked.node.as_array(),
|
||||
new GotIntroMessage(valuesFound, whoasked.txid));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user