mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 19:49:32 +00:00
warn if trade wallet is more than 10 blocks behind monerod
This commit is contained in:
parent
b3ec46e769
commit
3e112485ba
1 changed files with 3 additions and 2 deletions
|
@ -2106,8 +2106,9 @@ public abstract class Trade implements Tradable, Model {
|
||||||
// log warning if wallet is too far behind daemon
|
// log warning if wallet is too far behind daemon
|
||||||
MoneroDaemonInfo lastInfo = xmrConnectionService.getLastInfo();
|
MoneroDaemonInfo lastInfo = xmrConnectionService.getLastInfo();
|
||||||
long walletHeight = wallet.getHeight();
|
long walletHeight = wallet.getHeight();
|
||||||
if (wasWalletSynced && isDepositsPublished() && !isIdling() && lastInfo != null && walletHeight < lastInfo.getHeight() - 3 && !Config.baseCurrencyNetwork().isTestnet()) {
|
int maxBlocksBehindWarning = 10;
|
||||||
log.warn("Wallet is more than 3 blocks behind monerod for {} {}, wallet height={}, monerod height={},", getClass().getSimpleName(), getShortId(), walletHeight, lastInfo.getHeight());
|
if (wasWalletSynced && isDepositsPublished() && !isIdling() && lastInfo != null && walletHeight < lastInfo.getHeight() - maxBlocksBehindWarning && !Config.baseCurrencyNetwork().isTestnet()) {
|
||||||
|
log.warn("Wallet is more than {} blocks behind monerod for {} {}, wallet height={}, monerod height={},", maxBlocksBehindWarning, getClass().getSimpleName(), getShortId(), walletHeight, lastInfo.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip if either deposit tx id is unknown
|
// skip if either deposit tx id is unknown
|
||||||
|
|
Loading…
Reference in a new issue