Skip to content

Commit

Permalink
Merge pull request #7189 from HenrikJannsen/set-useFullModeDaoMonitor…
Browse files Browse the repository at this point in the history
…-to-true-in-all-headless-apps

Set useFullModeDaoMonitor to true in all headless apps
  • Loading branch information
alejandrogarcia83 authored Jul 19, 2024
2 parents 7013e95 + d39dd2a commit 6bef6cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,5 @@ protected void onBasicServicesInitialized() {
super.onBasicServicesInitialized();

daoSetup.onAllServicesInitialized(log::error, log::warn);

// For seed nodes we need to set default value to true
preferences.setUseFullModeDaoMonitor(true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.user.Cookie;
import bisq.core.user.CookieKey;
import bisq.core.user.Preferences;
import bisq.core.user.User;

import bisq.network.p2p.P2PService;
Expand Down Expand Up @@ -70,6 +71,7 @@ public abstract class ExecutableForAppWithP2p extends BisqExecutable {
private TradeLimits tradeLimits;
private AppSetupWithP2PAndDAO appSetupWithP2PAndDAO;
protected P2PService p2PService;
protected Preferences preferences;
protected DaoStateMonitoringService daoStateMonitoringService;

protected Cookie cookie;
Expand Down Expand Up @@ -101,6 +103,7 @@ protected void applyInjector() {
// Pin that as it is used in PaymentMethods and verification in TradeStatistics
tradeLimits = injector.getInstance(TradeLimits.class);
daoStateMonitoringService = injector.getInstance(DaoStateMonitoringService.class);
preferences = injector.getInstance(Preferences.class);
preventPeriodicShutdownAtSeedNode = injector.getInstance(Key.get(boolean.class,
Names.named(Config.PREVENT_PERIODIC_SHUTDOWN_AT_SEED_NODE)));
}
Expand All @@ -115,6 +118,10 @@ protected void startApplication() {
}
});

// If the option useFullModeDaoMonitor is set the preferences value is ignored, otherwise we default to true
// as we expect that headless nodes run as full dao nodes
preferences.setUseFullModeDaoMonitor(true);

daoStateMonitoringService.addListener(new DaoStateMonitoringService.Listener() {
@Override
public void onCheckpointFailed() {
Expand Down
1 change: 0 additions & 1 deletion restapi/src/main/java/bisq/restapi/RestApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ protected void applyInjector() {
protected void startApplication() {
super.startApplication();

preferences.setUseFullModeDaoMonitor(false);
daoStateSnapshotService.setResyncDaoStateFromResourcesHandler(this::gracefulShutDown);
}

Expand Down

0 comments on commit 6bef6cc

Please sign in to comment.