mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-20 23:56:30 -04:00
Add more logging
This commit is contained in:
parent
4bd3a8cb3f
commit
8716a506e8
@ -21,6 +21,7 @@ import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.util.concurrent.FutureCallback;
|
||||
import com.google.common.util.concurrent.Futures;
|
||||
import com.google.common.util.concurrent.Service;
|
||||
import io.bitsquare.app.Log;
|
||||
import io.bitsquare.btc.listeners.AddressConfidenceListener;
|
||||
import io.bitsquare.btc.listeners.BalanceListener;
|
||||
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
||||
@ -538,12 +539,14 @@ public class WalletService {
|
||||
|
||||
@Override
|
||||
protected void progress(double percentage, int blocksLeft, Date date) {
|
||||
Log.traceCall("percentage=" + percentage);
|
||||
super.progress(percentage, blocksLeft, date);
|
||||
UserThread.execute(() -> this.percentage.set(percentage / 100d));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doneDownload() {
|
||||
Log.traceCall();
|
||||
super.doneDownload();
|
||||
UserThread.execute(() -> this.percentage.set(1d));
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import com.google.inject.Inject;
|
||||
import io.bitsquare.alert.Alert;
|
||||
import io.bitsquare.alert.AlertManager;
|
||||
import io.bitsquare.app.BitsquareApp;
|
||||
import io.bitsquare.app.Log;
|
||||
import io.bitsquare.app.Version;
|
||||
import io.bitsquare.arbitration.ArbitratorManager;
|
||||
import io.bitsquare.arbitration.Dispute;
|
||||
@ -241,7 +242,7 @@ class MainViewModel implements ViewModel {
|
||||
walletServiceErrorMsg.set("You lost the connection to all bitcoin peers.");
|
||||
else if ((int) oldValue == 0 && (int) newValue > 0)
|
||||
walletServiceErrorMsg.set(null);
|
||||
|
||||
|
||||
numBTCPeers = (int) newValue;
|
||||
setBitcoinNetworkSyncProgress(walletService.downloadPercentageProperty().get());
|
||||
});
|
||||
@ -561,9 +562,10 @@ class MainViewModel implements ViewModel {
|
||||
}
|
||||
|
||||
private void setBitcoinNetworkSyncProgress(double value) {
|
||||
Log.traceCall("btcSyncProgress=" + value);
|
||||
btcSyncProgress.set(value);
|
||||
String numPeers = "Nr. of peers: " + numBTCPeers;
|
||||
if (value >= 1) {
|
||||
if (value == 1) {
|
||||
stopBlockchainSyncTimeout();
|
||||
btcSplashInfo.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);
|
||||
btcFooterInfo.set(numPeers + " / synchronizing " + btcNetworkAsString + ": " + percentage);
|
||||
|
||||
} else {
|
||||
} else if (value == -1) {
|
||||
// not ready yet
|
||||
btcSplashInfo.set(numPeers + " / connecting to " + btcNetworkAsString);
|
||||
btcFooterInfo.set(numPeers + " / connecting to " + btcNetworkAsString);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user