forked from Qortal/qortal
Don't add online accounts to the import queue if they are already validated
This commit is contained in:
parent
49d83650f4
commit
84a16157d1
@ -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…
x
Reference in New Issue
Block a user