mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-14 09:25:37 -04:00
support tor connection to monero network through monero-java
cleanup startup routine for stability remove call to `get_connections` increase wallet startup timeout to 1 hour increase app startup timeout to 5 minutes skip checkstyle in make commands
This commit is contained in:
parent
8305c62510
commit
fd69f4250b
10 changed files with 149 additions and 88 deletions
|
@ -424,7 +424,7 @@ public class HavenoUtils {
|
|||
public static boolean isLocalHost(String uri) {
|
||||
try {
|
||||
String host = new URI(uri).getHost();
|
||||
return host.equals(LOOPBACK_HOST) || host.equals(LOCALHOST);
|
||||
return LOOPBACK_HOST.equals(host) || LOCALHOST.equals(host);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
|
@ -1662,12 +1662,16 @@ public abstract class Trade implements Tradable, Model {
|
|||
private void setWalletRefreshPeriod(long walletRefreshPeriod) {
|
||||
if (this.isShutDown) return;
|
||||
if (this.walletRefreshPeriod != null && this.walletRefreshPeriod == walletRefreshPeriod) return;
|
||||
log.info("Setting wallet refresh rate for {} {} to {}", getClass().getSimpleName(), getId(), walletRefreshPeriod);
|
||||
this.walletRefreshPeriod = walletRefreshPeriod;
|
||||
getWallet().startSyncing(getWalletRefreshPeriod()); // TODO (monero-project): wallet rpc waits until last sync period finishes before starting new sync period
|
||||
if (txPollLooper != null) {
|
||||
txPollLooper.stop();
|
||||
txPollLooper = null;
|
||||
synchronized (walletLock) {
|
||||
if (getWallet() != null) {
|
||||
log.info("Setting wallet refresh rate for {} {} to {}", getClass().getSimpleName(), getId(), walletRefreshPeriod);
|
||||
getWallet().startSyncing(getWalletRefreshPeriod()); // TODO (monero-project): wallet rpc waits until last sync period finishes before starting new sync period
|
||||
}
|
||||
if (txPollLooper != null) {
|
||||
txPollLooper.stop();
|
||||
txPollLooper = null;
|
||||
}
|
||||
}
|
||||
startPolling();
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
|||
.collect(Collectors.toSet());
|
||||
unreservedFrozenKeyImages.removeAll(reservedKeyImages);
|
||||
if (!unreservedFrozenKeyImages.isEmpty()) {
|
||||
log.info("Thawing outputs which are not reserved for offer or trade: " + unreservedFrozenKeyImages);
|
||||
log.warn("Thawing outputs which are not reserved for offer or trade: " + unreservedFrozenKeyImages);
|
||||
xmrWalletService.thawOutputs(unreservedFrozenKeyImages);
|
||||
xmrWalletService.saveMainWallet();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue