Fix DAO needs resync popup.

The resync popup was being shown when flag isInConflictWithSeedNode
was set, but there is also a different relevant flag
isDaoStateBlockChainNotConnecting which can happen in certain
situations.  For that case we also need to show the popup.
This commit is contained in:
jmacxx 2022-03-04 14:17:53 -06:00 committed by Christoph Atteneder
parent 24bd47508b
commit e9c021eac6
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B
2 changed files with 3 additions and 3 deletions

View file

@ -529,8 +529,8 @@ public class DaoFacade implements DaoSetupService {
return daoStateService.getBlockAtHeight(chainHeight);
}
public boolean isInConflictWithSeedNode() {
return daoStateMonitoringService.isInConflictWithSeedNode();
public boolean daoStateNeedsRebuilding() {
return daoStateMonitoringService.isInConflictWithSeedNode() || daoStateMonitoringService.isDaoStateBlockChainNotConnecting();
}
///////////////////////////////////////////////////////////////////////////////////////////

View file

@ -97,7 +97,7 @@ public class DaoPresentation implements DaoStateListener {
if (synced) {
bsqInfo.set("");
if (daoFacade.isInConflictWithSeedNode() && !daoConflictWarningShown) {
if (daoFacade.daoStateNeedsRebuilding() && !daoConflictWarningShown) {
daoConflictWarningShown = true; // only warn max 1 time per session so as not to annoy
GUIUtil.showDaoNeedsResyncPopup(navigation);
}