From e1043ceacb490e1f0b34ef6032bd457a2aa15c00 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sun, 21 May 2023 08:41:56 +0100 Subject: [PATCH] Fixed bug causing duplicate AT entries in local array. --- src/main/java/org/qortal/repository/RepositoryManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/qortal/repository/RepositoryManager.java b/src/main/java/org/qortal/repository/RepositoryManager.java index 1562b38c..fefaeea9 100644 --- a/src/main/java/org/qortal/repository/RepositoryManager.java +++ b/src/main/java/org/qortal/repository/RepositoryManager.java @@ -143,7 +143,8 @@ public abstract class RepositoryManager { for (ATTransactionData atTransactionData : atTransactions) { ATData atData = repository.getATRepository().fromATAddress(atTransactionData.getATAddress()); - if (!ats.contains(atData)) { + boolean hasExistingEntry = ats.stream().anyMatch(a -> Objects.equals(a.getATAddress(), atTransactionData.getATAddress())); + if (!hasExistingEntry) { ats.add(atData); } }