Skip to content

Commit

Permalink
Merge pull request #2836 from devinbileck/fix-dao-sync-text-after-res…
Browse files Browse the repository at this point in the history
…tore-from-seed

Fix dao sync text after restore from seed
  • Loading branch information
ManfredKarrer authored May 16, 2019
2 parents cf9dc0d + 25d3d2d commit 7d7da05
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/bisq/core/app/WalletAppSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
} else if (percentage > 0.0) {
result = Res.get("mainView.footer.btcInfo",
peers,
Res.get("mainView.footer.btcInfo.synchronizedWith"),
Res.get("mainView.footer.btcInfo.synchronizingWith"),
getBtcNetworkAsString() + ": " + formatter.formatToPercentWithSymbol(percentage));
} else {
result = Res.get("mainView.footer.btcInfo",
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ mainView.footer.localhostBitcoinNode=(localhost)
mainView.footer.btcInfo=Bitcoin network peers: {0} / {1} {2}
mainView.footer.btcInfo.initializing=Connecting to Bitcoin network
mainView.footer.bsqInfo.synchronizing=/ Synchronizing DAO
mainView.footer.btcInfo.synchronizingWith=Synchronizing with
mainView.footer.btcInfo.synchronizedWith=Synchronized with
mainView.footer.btcInfo.connectingTo=Connecting to
mainView.footer.btcInfo.connectionFailed=connection failed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,23 @@ private void onUpdateAnyChainHeight() {
chainSyncIndicator.setManaged(!synced);
if (synced) {
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSynced",
currentBlockHeight,
walletChainHeight));
currentBlockHeight));
} else {
chainSyncIndicator.setProgress(progress);
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSyncing",
currentBlockHeight,
walletChainHeight));
if (walletChainHeight > currentBlockHeight) {
// Normally we get the latest block height from BitcoinJ as the target height,
// and we request BSQ blocks from seed nodes up to latest block
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSyncing",
currentBlockHeight,
walletChainHeight));
} else {
// But when restoring from seed, we receive the latest block height
// from the seed nodes while BitcoinJ has not received all blocks yet and
// is still syncing
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSyncing",
walletChainHeight,
currentBlockHeight));
}
}
} else {
chainHeightLabel.setText(Res.get("dao.wallet.chainHeightSyncing",
Expand Down

0 comments on commit 7d7da05

Please sign in to comment.