add trade init steps and reset timeout

This commit is contained in:
woodser 2024-05-05 19:32:07 -04:00
parent 6fb846d783
commit 78ec06b851
18 changed files with 63 additions and 36 deletions

View file

@ -372,12 +372,6 @@ public class XmrWalletService {
return useNativeXmrWallet && MoneroUtils.isNativeLibraryLoaded();
}
public MoneroSyncResult syncWallet() {
MoneroSyncResult result = syncWallet(wallet);
walletHeight.set(wallet.getHeight());
return result;
}
/**
* Sync the given wallet in a thread pool with other wallets.
*/
@ -1799,7 +1793,7 @@ public class XmrWalletService {
// sync wallet if behind daemon
if (walletHeight.get() < xmrConnectionService.getTargetHeight()) {
synchronized (WALLET_LOCK) { // avoid long sync from blocking other operations
syncWallet();
syncMainWallet();
}
}
@ -1833,6 +1827,14 @@ public class XmrWalletService {
}
}
private MoneroSyncResult syncMainWallet() {
synchronized (WALLET_LOCK) {
MoneroSyncResult result = syncWallet(wallet);
walletHeight.set(wallet.getHeight());
return result;
}
}
public boolean isWalletConnectedToDaemon() {
synchronized (WALLET_LOCK) {
try {