mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 11:39:29 +00:00
set and display current monerod height instead of target
This commit is contained in:
parent
288b63578b
commit
846b278b5d
2 changed files with 2 additions and 4 deletions
|
@ -558,7 +558,7 @@ public final class CoreMoneroConnectionsService {
|
|||
log.debug("Polling daemon info");
|
||||
if (daemon == null) throw new RuntimeException("No daemon connection");
|
||||
lastInfo = daemon.getInfo();
|
||||
chainHeight.set(lastInfo.getTargetHeight() == 0 ? lastInfo.getHeight() : lastInfo.getTargetHeight());
|
||||
chainHeight.set(lastInfo.getHeight());
|
||||
|
||||
// set peer connections
|
||||
// TODO: peers often uknown due to restricted RPC call, skipping call to get peer connections
|
||||
|
|
|
@ -39,7 +39,6 @@ import javafx.beans.property.SimpleStringProperty;
|
|||
import javafx.beans.property.StringProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import monero.daemon.model.MoneroDaemonInfo;
|
||||
|
||||
import org.bitcoinj.core.RejectMessage;
|
||||
import org.bitcoinj.core.VersionMessage;
|
||||
|
@ -115,8 +114,7 @@ public class WalletAppSetup {
|
|||
if (exception == null && errorMsg == null) {
|
||||
double percentage = (double) downloadPercentage;
|
||||
xmrSyncProgress.set(percentage);
|
||||
MoneroDaemonInfo lastInfo = connectionService.getLastInfo();
|
||||
Long bestChainHeight = lastInfo == null ? null : lastInfo.getHeight();
|
||||
Long bestChainHeight = chainHeight == null ? null : (Long) chainHeight;
|
||||
String chainHeightAsString = bestChainHeight != null && bestChainHeight > 0 ?
|
||||
String.valueOf(bestChainHeight) :
|
||||
"";
|
||||
|
|
Loading…
Reference in a new issue