From 1df2ab4389ac840a9d6a97c0504de1789520363b Mon Sep 17 00:00:00 2001 From: woodser Date: Mon, 18 Dec 2023 10:50:23 -0500 Subject: [PATCH] replace AppSetupWithP2PAndDAO with AppSetupWithP2P --- .../core/app/misc/AppSetupWithP2PAndDAO.java | 60 ------------------- .../main/java/haveno/seednode/SeedNode.java | 4 +- .../java/haveno/seednode/GuiceSetupTest.java | 4 +- .../java/haveno/statistics/Statistics.java | 4 +- 4 files changed, 6 insertions(+), 66 deletions(-) delete mode 100644 core/src/main/java/haveno/core/app/misc/AppSetupWithP2PAndDAO.java diff --git a/core/src/main/java/haveno/core/app/misc/AppSetupWithP2PAndDAO.java b/core/src/main/java/haveno/core/app/misc/AppSetupWithP2PAndDAO.java deleted file mode 100644 index 292085ec..00000000 --- a/core/src/main/java/haveno/core/app/misc/AppSetupWithP2PAndDAO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of Haveno. - * - * Haveno is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * Haveno is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with Haveno. If not, see . - */ - -package haveno.core.app.misc; - -import haveno.common.config.Config; -import haveno.core.account.sign.SignedWitnessService; -import haveno.core.account.witness.AccountAgeWitnessService; -import haveno.core.filter.FilterManager; -import haveno.core.trade.statistics.TradeStatisticsManager; -import haveno.network.p2p.P2PService; -import haveno.network.p2p.peers.PeerManager; -import haveno.network.p2p.storage.P2PDataStorage; -import lombok.extern.slf4j.Slf4j; - -import javax.inject.Inject; - -@Slf4j -public class AppSetupWithP2PAndDAO extends AppSetupWithP2P { - - @Inject - public AppSetupWithP2PAndDAO(P2PService p2PService, - P2PDataStorage p2PDataStorage, - PeerManager peerManager, - TradeStatisticsManager tradeStatisticsManager, - AccountAgeWitnessService accountAgeWitnessService, - SignedWitnessService signedWitnessService, - FilterManager filterManager, - Config config) { - super(p2PService, - p2PDataStorage, - peerManager, - tradeStatisticsManager, - accountAgeWitnessService, - signedWitnessService, - filterManager, - config); - - - } - - @Override - protected void onBasicServicesInitialized() { - super.onBasicServicesInitialized(); - } -} diff --git a/seednode/src/main/java/haveno/seednode/SeedNode.java b/seednode/src/main/java/haveno/seednode/SeedNode.java index 8aa28dc3..e2ea706c 100644 --- a/seednode/src/main/java/haveno/seednode/SeedNode.java +++ b/seednode/src/main/java/haveno/seednode/SeedNode.java @@ -19,7 +19,7 @@ package haveno.seednode; import com.google.inject.Injector; import haveno.core.app.misc.AppSetup; -import haveno.core.app.misc.AppSetupWithP2PAndDAO; +import haveno.core.app.misc.AppSetupWithP2P; import haveno.core.network.p2p.inventory.GetInventoryRequestHandler; import lombok.Setter; import lombok.extern.slf4j.Slf4j; @@ -35,7 +35,7 @@ public class SeedNode { } public void startApplication() { - appSetup = injector.getInstance(AppSetupWithP2PAndDAO.class); + appSetup = injector.getInstance(AppSetupWithP2P.class); appSetup.start(); getInventoryRequestHandler = injector.getInstance(GetInventoryRequestHandler.class); diff --git a/seednode/src/test/java/haveno/seednode/GuiceSetupTest.java b/seednode/src/test/java/haveno/seednode/GuiceSetupTest.java index 3bb4dd69..e82a2269 100644 --- a/seednode/src/test/java/haveno/seednode/GuiceSetupTest.java +++ b/seednode/src/test/java/haveno/seednode/GuiceSetupTest.java @@ -2,7 +2,7 @@ package haveno.seednode; import com.google.inject.Guice; import haveno.common.config.Config; -import haveno.core.app.misc.AppSetupWithP2PAndDAO; +import haveno.core.app.misc.AppSetupWithP2P; import haveno.core.app.misc.ModuleForAppWithP2p; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.Res; @@ -15,6 +15,6 @@ public class GuiceSetupTest { CurrencyUtil.setup(); ModuleForAppWithP2p module = new ModuleForAppWithP2p(new Config()); - Guice.createInjector(module).getInstance(AppSetupWithP2PAndDAO.class); + Guice.createInjector(module).getInstance(AppSetupWithP2P.class); } } diff --git a/statsnode/src/main/java/haveno/statistics/Statistics.java b/statsnode/src/main/java/haveno/statistics/Statistics.java index 5ae5ca24..4b2ff2d3 100644 --- a/statsnode/src/main/java/haveno/statistics/Statistics.java +++ b/statsnode/src/main/java/haveno/statistics/Statistics.java @@ -19,7 +19,7 @@ package haveno.statistics; import com.google.inject.Injector; import haveno.core.app.misc.AppSetup; -import haveno.core.app.misc.AppSetupWithP2PAndDAO; +import haveno.core.app.misc.AppSetupWithP2P; import haveno.core.offer.OfferBookService; import haveno.core.provider.price.PriceFeedService; import haveno.core.trade.statistics.TradeStatisticsManager; @@ -62,7 +62,7 @@ public class Statistics { } }); - appSetup = injector.getInstance(AppSetupWithP2PAndDAO.class); + appSetup = injector.getInstance(AppSetupWithP2P.class); appSetup.start(); } }