Browse Source

Don't add online accounts to the import queue if they are already validated

BLOCK_SUMMARIES_V2
CalDescent 2 years ago
parent
commit
84a16157d1
  1. 6
      src/main/java/org/qortal/controller/OnlineAccountsManager.java

6
src/main/java/org/qortal/controller/OnlineAccountsManager.java

@ -792,6 +792,12 @@ public class OnlineAccountsManager {
// Add any online accounts to the queue that aren't already present // Add any online accounts to the queue that aren't already present
for (OnlineAccountData onlineAccountData : peersOnlineAccounts) { for (OnlineAccountData onlineAccountData : peersOnlineAccounts) {
Set<OnlineAccountData> onlineAccounts = this.currentOnlineAccounts.computeIfAbsent(onlineAccountData.getTimestamp(), k -> ConcurrentHashMap.newKeySet());
if (onlineAccounts.contains(onlineAccountData))
// We have already validated this online account
continue;
boolean isNewEntry = onlineAccountsImportQueue.add(onlineAccountData); boolean isNewEntry = onlineAccountsImportQueue.add(onlineAccountData);
if (isNewEntry) if (isNewEntry)

Loading…
Cancel
Save