init main wallet with connection applied in same thread

This commit is contained in:
woodser 2025-04-14 08:26:28 -04:00 committed by GitHub
parent 52f0c20c8c
commit 53b0f203de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View File

@ -1952,7 +1952,6 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
///////////////////////////////////////////////////////////////////////////////////////////
private void maybeUpdatePersistedOffers() {
// We need to clone to avoid ConcurrentModificationException
List<OpenOffer> openOffersClone = getOpenOffers();
openOffersClone.forEach(originalOpenOffer -> {
Offer originalOffer = originalOpenOffer.getOffer();

View File

@ -57,7 +57,7 @@ public abstract class XmrWalletBase {
// private
private boolean testReconnectOnStartup = false; // test reconnecting on startup while syncing so the wallet is blocked
private String testReconnectMonerod1 = "http://node.community.rino.io:18081";
private String testReconnectMonerod1 = "http://xmr-node.cakewallet.com:18081";
private String testReconnectMonerod2 = "http://nodex.monerujo.io:18081";
public XmrWalletBase() {

View File

@ -1467,8 +1467,8 @@ public class XmrWalletService extends XmrWalletBase {
log.info("Monero wallet unlocked balance={}, pending balance={}, total balance={}", unlockedBalance, balance.subtract(unlockedBalance), balance);
}
// reapply connection after wallet synced (might reinitialize wallet on new thread)
ThreadUtils.execute(() -> onConnectionChanged(xmrConnectionService.getConnection()), THREAD_ID);
// reapply connection after wallet synced (might reinitialize wallet with proxy)
onConnectionChanged(xmrConnectionService.getConnection());
// reset internal state if main wallet was swapped
resetIfWalletChanged();