From 83794107f3e4a40943e4e1eedb6b688724801058 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 22 Oct 2023 07:48:07 -0400 Subject: [PATCH] SSU: Comment fix re: LHMCache iteration order --- .../net/i2p/router/transport/udp/EstablishmentManager.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java b/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java index f75cc07453..a66186bcb0 100644 --- a/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java +++ b/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java @@ -2990,10 +2990,9 @@ private void saveTokens() { } long now = _context.clock().now(); int count = 0; - // Roughly speaking, the LHMCache will iterate newest-first, - // so when we add them back in loadTokens(), the oldest would be at - // the head of the map and the newest would be purged first. - // Sort them by expiration oldest-first so loadTokens() will + // Roughly speaking, the LHMCache will iterate oldest-first, + // but to be sure, + // sort them by expiration oldest-first so loadTokens() will // put them in the LHMCache in the right order. TokenComparator comp = new TokenComparator(); List> tmp;