Update oldestDelta during cache eviction

This commit is contained in:
Jason B. Cox 2025-04-10 10:51:37 -07:00
parent c7e44a2301
commit d9dc4b7008

View File

@ -297,6 +297,7 @@ bool CryptoEngine::setCryptoSharedSecret(meshtastic_UserLite_public_key_t pubkey
} }
if (delta > oldestDelta) { if (delta > oldestDelta) {
oldestKey = key; oldestKey = key;
oldestDelta = delta;
} }
} }
sharedSecretCache.erase(oldestKey); sharedSecretCache.erase(oldestKey);