From 0526fef37b8c15144c903c482487c4a499fedf4d Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 14 Jan 2020 13:08:27 -0500 Subject: [PATCH] store RCs if valid --- llarp/dht/messages/gotrouter.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/llarp/dht/messages/gotrouter.cpp b/llarp/dht/messages/gotrouter.cpp index e66b59907..eab4cc7f7 100644 --- a/llarp/dht/messages/gotrouter.cpp +++ b/llarp/dht/messages/gotrouter.cpp @@ -116,8 +116,13 @@ namespace llarp dht.pendingRouterLookups().Found(owner, R[0].pubkey, R); return true; } - llarp::LogWarn("Unwarranted GRM from ", From, " txid=", txid); - return false; + // store if valid + for(const auto &rc : R) + { + if(not dht.GetRouter().rcLookupHandler().CheckRC(rc)) + return false; + } + return true; } } // namespace dht } // namespace llarp