mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-22 14:41:08 -04:00
Add more logging
This commit is contained in:
parent
4bd3a8cb3f
commit
8716a506e8
2 changed files with 9 additions and 3 deletions
|
@ -21,6 +21,7 @@ import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.util.concurrent.FutureCallback;
|
import com.google.common.util.concurrent.FutureCallback;
|
||||||
import com.google.common.util.concurrent.Futures;
|
import com.google.common.util.concurrent.Futures;
|
||||||
import com.google.common.util.concurrent.Service;
|
import com.google.common.util.concurrent.Service;
|
||||||
|
import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.btc.listeners.AddressConfidenceListener;
|
import io.bitsquare.btc.listeners.AddressConfidenceListener;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
||||||
|
@ -538,12 +539,14 @@ public class WalletService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void progress(double percentage, int blocksLeft, Date date) {
|
protected void progress(double percentage, int blocksLeft, Date date) {
|
||||||
|
Log.traceCall("percentage=" + percentage);
|
||||||
super.progress(percentage, blocksLeft, date);
|
super.progress(percentage, blocksLeft, date);
|
||||||
UserThread.execute(() -> this.percentage.set(percentage / 100d));
|
UserThread.execute(() -> this.percentage.set(percentage / 100d));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doneDownload() {
|
protected void doneDownload() {
|
||||||
|
Log.traceCall();
|
||||||
super.doneDownload();
|
super.doneDownload();
|
||||||
UserThread.execute(() -> this.percentage.set(1d));
|
UserThread.execute(() -> this.percentage.set(1d));
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ import com.google.inject.Inject;
|
||||||
import io.bitsquare.alert.Alert;
|
import io.bitsquare.alert.Alert;
|
||||||
import io.bitsquare.alert.AlertManager;
|
import io.bitsquare.alert.AlertManager;
|
||||||
import io.bitsquare.app.BitsquareApp;
|
import io.bitsquare.app.BitsquareApp;
|
||||||
|
import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.app.Version;
|
import io.bitsquare.app.Version;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
import io.bitsquare.arbitration.Dispute;
|
import io.bitsquare.arbitration.Dispute;
|
||||||
|
@ -561,9 +562,10 @@ class MainViewModel implements ViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setBitcoinNetworkSyncProgress(double value) {
|
private void setBitcoinNetworkSyncProgress(double value) {
|
||||||
|
Log.traceCall("btcSyncProgress=" + value);
|
||||||
btcSyncProgress.set(value);
|
btcSyncProgress.set(value);
|
||||||
String numPeers = "Nr. of peers: " + numBTCPeers;
|
String numPeers = "Nr. of peers: " + numBTCPeers;
|
||||||
if (value >= 1) {
|
if (value == 1) {
|
||||||
stopBlockchainSyncTimeout();
|
stopBlockchainSyncTimeout();
|
||||||
btcSplashInfo.set(numPeers + " / synchronized with " + btcNetworkAsString);
|
btcSplashInfo.set(numPeers + " / synchronized with " + btcNetworkAsString);
|
||||||
btcFooterInfo.set(numPeers + " / synchronized with " + btcNetworkAsString);
|
btcFooterInfo.set(numPeers + " / synchronized with " + btcNetworkAsString);
|
||||||
|
@ -576,7 +578,8 @@ class MainViewModel implements ViewModel {
|
||||||
btcSplashInfo.set(numPeers + " / synchronizing with " + btcNetworkAsString + ": " + percentage);
|
btcSplashInfo.set(numPeers + " / synchronizing with " + btcNetworkAsString + ": " + percentage);
|
||||||
btcFooterInfo.set(numPeers + " / synchronizing " + btcNetworkAsString + ": " + percentage);
|
btcFooterInfo.set(numPeers + " / synchronizing " + btcNetworkAsString + ": " + percentage);
|
||||||
|
|
||||||
} else {
|
} else if (value == -1) {
|
||||||
|
// not ready yet
|
||||||
btcSplashInfo.set(numPeers + " / connecting to " + btcNetworkAsString);
|
btcSplashInfo.set(numPeers + " / connecting to " + btcNetworkAsString);
|
||||||
btcFooterInfo.set(numPeers + " / connecting to " + btcNetworkAsString);
|
btcFooterInfo.set(numPeers + " / connecting to " + btcNetworkAsString);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue