address feedback from tom

pull/1038/head
Jeff Becker 4 years ago
parent 6fd714d193
commit c5feb07fb9
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -3,6 +3,10 @@
#include <dht/context.hpp>
#include <dht/messages/findrouter.hpp>
#include <dht/messages/gotrouter.hpp>
#include <router/abstractrouter.hpp>
#include <router/i_rc_lookup_handler.hpp>
#include <utility>
namespace llarp
@ -63,7 +67,8 @@ namespace llarp
RouterContact found;
for(const auto &rc : valuesFound)
{
if(found.OtherIsNewer(rc))
if(found.OtherIsNewer(rc)
&& parent->GetRouter()->rcLookupHandler().CheckRC(rc))
found = rc;
}
valuesFound.clear();
@ -79,9 +84,6 @@ namespace llarp
whoasked.node.as_array(),
new GotRouterMessage({}, whoasked.txid, valuesFound, false), false);
}
// store this in our nodedb for caching
if(valuesFound.size() > 0)
parent->StoreRC(valuesFound[0]);
}
} // namespace dht
} // namespace llarp

Loading…
Cancel
Save