replace AppSetupWithP2PAndDAO with AppSetupWithP2P

This commit is contained in:
woodser 2023-12-18 10:50:23 -05:00
parent 01a57c18f7
commit 1df2ab4389
4 changed files with 6 additions and 66 deletions

View file

@ -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 <http://www.gnu.org/licenses/>.
*/
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();
}
}

View file

@ -19,7 +19,7 @@ package haveno.seednode;
import com.google.inject.Injector; import com.google.inject.Injector;
import haveno.core.app.misc.AppSetup; 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 haveno.core.network.p2p.inventory.GetInventoryRequestHandler;
import lombok.Setter; import lombok.Setter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -35,7 +35,7 @@ public class SeedNode {
} }
public void startApplication() { public void startApplication() {
appSetup = injector.getInstance(AppSetupWithP2PAndDAO.class); appSetup = injector.getInstance(AppSetupWithP2P.class);
appSetup.start(); appSetup.start();
getInventoryRequestHandler = injector.getInstance(GetInventoryRequestHandler.class); getInventoryRequestHandler = injector.getInstance(GetInventoryRequestHandler.class);

View file

@ -2,7 +2,7 @@ package haveno.seednode;
import com.google.inject.Guice; import com.google.inject.Guice;
import haveno.common.config.Config; 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.app.misc.ModuleForAppWithP2p;
import haveno.core.locale.CurrencyUtil; import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.Res; import haveno.core.locale.Res;
@ -15,6 +15,6 @@ public class GuiceSetupTest {
CurrencyUtil.setup(); CurrencyUtil.setup();
ModuleForAppWithP2p module = new ModuleForAppWithP2p(new Config()); ModuleForAppWithP2p module = new ModuleForAppWithP2p(new Config());
Guice.createInjector(module).getInstance(AppSetupWithP2PAndDAO.class); Guice.createInjector(module).getInstance(AppSetupWithP2P.class);
} }
} }

View file

@ -19,7 +19,7 @@ package haveno.statistics;
import com.google.inject.Injector; import com.google.inject.Injector;
import haveno.core.app.misc.AppSetup; 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.offer.OfferBookService;
import haveno.core.provider.price.PriceFeedService; import haveno.core.provider.price.PriceFeedService;
import haveno.core.trade.statistics.TradeStatisticsManager; 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(); appSetup.start();
} }
} }