mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-29 09:03:14 +00:00
fix concurrent modification exception
This commit is contained in:
parent
52676d2184
commit
d6d5e82bec
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,10 @@ import net.mynero.wallet.model.TransactionInfo;
|
||||||
import net.mynero.wallet.model.Wallet;
|
import net.mynero.wallet.model.Wallet;
|
||||||
import net.mynero.wallet.model.WalletManager;
|
import net.mynero.wallet.model.WalletManager;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class AddressService extends ServiceBase {
|
public class AddressService extends ServiceBase {
|
||||||
public static AddressService instance = null;
|
public static AddressService instance = null;
|
||||||
private int latestAddressIndex = 1;
|
private int latestAddressIndex = 1;
|
||||||
|
@ -19,7 +23,8 @@ public class AddressService extends ServiceBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshAddresses() {
|
public void refreshAddresses() {
|
||||||
for (TransactionInfo info : HistoryService.getInstance().getHistory()) {
|
List<TransactionInfo> localTransactionList = new ArrayList<>(HistoryService.getInstance().getHistory());
|
||||||
|
for (TransactionInfo info : localTransactionList) {
|
||||||
if (info.addressIndex >= latestAddressIndex) {
|
if (info.addressIndex >= latestAddressIndex) {
|
||||||
latestAddressIndex = info.addressIndex + 1;
|
latestAddressIndex = info.addressIndex + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue