Add evicted age and accessor in NodeDB

This commit is contained in:
Jonathan Bennett
2026-01-18 22:16:20 -06:00
parent 49accefd8b
commit b056c405e6
2 changed files with 5 additions and 0 deletions

View File

@@ -2029,6 +2029,7 @@ meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n)
}
// if we found a "boring" node, evict it
if (oldestBoringIndex != -1) {
evictedAge = sinceLastSeen(&meshNodes->at(oldestBoringIndex));
oldestIndex = oldestBoringIndex;
}
@@ -2040,6 +2041,7 @@ meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n)
(numMeshNodes)--;
}
}
LOG_WARN("Evicted node %u secs old", evictedAge);
// add the node at the end
lite = &meshNodes->at((numMeshNodes)++);