dht: allow search table update with listen token refresh

This commit is contained in:
Adrien Béraud committed 2026-03-14 16:17:32 -04:00
1 parent 5afc452f32
commit ccd4865df5
3 files changed
+19 -4

No files matched your search

+4 -2
View File
@@ -428,8 +428,10 @@ NetworkEngineTester::testListenConfirmationUpdatesSearchNodeToken()
localDht.onListenDone(node, answer, sr);
CPPUNIT_ASSERT(searchNodePtr->token == answer.ntoken);
CPPUNIT_ASSERT(searchNodePtr->last_get_reply == localDht.scheduler.time());
CPPUNIT_ASSERT(searchNodePtr->isSynced(localDht.scheduler.time()));
/* last_get_reply should NOT be updated by listen confirmation,
so that periodic find_node requests still refresh the search table. */
CPPUNIT_ASSERT(searchNodePtr->last_get_reply == time_point::min());
CPPUNIT_ASSERT(!searchNodePtr->isSynced(localDht.scheduler.time()));
}
void