mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-25 23:39:26 -05:00
synchronize on wallet lock getting address entries
This commit is contained in:
parent
e2369480b2
commit
f9afd44345
@ -1026,6 +1026,7 @@ public class XmrWalletService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<XmrAddressEntry> getAddressEntryListAsImmutableList() {
|
public List<XmrAddressEntry> getAddressEntryListAsImmutableList() {
|
||||||
|
synchronized (walletLock) {
|
||||||
List<MoneroSubaddress> subaddresses = wallet.getSubaddresses(0);
|
List<MoneroSubaddress> subaddresses = wallet.getSubaddresses(0);
|
||||||
for (MoneroSubaddress subaddress : subaddresses) {
|
for (MoneroSubaddress subaddress : subaddresses) {
|
||||||
boolean exists = xmrAddressEntryList.getAddressEntriesAsListImmutable().stream().filter(addressEntry -> addressEntry.getAddressString().equals(subaddress.getAddress())).findAny().isPresent();
|
boolean exists = xmrAddressEntryList.getAddressEntriesAsListImmutable().stream().filter(addressEntry -> addressEntry.getAddressString().equals(subaddress.getAddress())).findAny().isPresent();
|
||||||
@ -1036,6 +1037,7 @@ public class XmrWalletService {
|
|||||||
}
|
}
|
||||||
return xmrAddressEntryList.getAddressEntriesAsListImmutable();
|
return xmrAddressEntryList.getAddressEntriesAsListImmutable();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public List<XmrAddressEntry> getUnusedAddressEntries() {
|
public List<XmrAddressEntry> getUnusedAddressEntries() {
|
||||||
return getUnusedAddressEntries(getTxsWithIncomingOutputs());
|
return getUnusedAddressEntries(getTxsWithIncomingOutputs());
|
||||||
|
Loading…
Reference in New Issue
Block a user