Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seed node repo refactoring #2464

Merged
merged 5 commits into from Feb 27, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -32,14 +32,12 @@

import bisq.common.Clock;
import bisq.common.app.Capabilities;
import bisq.common.app.Version;
import bisq.common.proto.network.NetworkEnvelope;
import bisq.common.proto.network.NetworkProtoResolver;
import bisq.core.app.BisqEnvironment;
import bisq.core.btc.BaseCurrencyNetwork;
import bisq.core.btc.BtcOptionKeys;
import bisq.core.network.p2p.seed.DefaultSeedNodeRepository;
import bisq.core.network.p2p.seed.SeedNodeAddressLookup;
import bisq.core.proto.network.CoreNetworkProtoResolver;
import bisq.core.proto.persistable.CorePersistenceProtoResolver;
import bisq.monitor.AvailableTor;
Expand Down Expand Up @@ -162,7 +160,6 @@ protected void execute() {

// boot up P2P node
File storageDir = torHiddenServiceDir;
String seedNodes = "";
try {
BisqEnvironment environment = new BisqEnvironment(new PropertySource<String>("name") {

Expand All @@ -177,8 +174,7 @@ public String getProperty(String name) {
NetworkProtoResolver networkProtoResolver = new CoreNetworkProtoResolver();
CorePersistenceProtoResolver persistenceProtoResolver = new CorePersistenceProtoResolver(null,
networkProtoResolver, storageDir);
DefaultSeedNodeRepository seedNodeRepository = new DefaultSeedNodeRepository(
new SeedNodeAddressLookup(environment, false, Version.getBaseCurrencyNetwork(), null, seedNodes));
DefaultSeedNodeRepository seedNodeRepository = new DefaultSeedNodeRepository(environment, null);
PeerManager peerManager = new PeerManager(networkNode, seedNodeRepository, new Clock(),
persistenceProtoResolver, maxConnections, storageDir);

Expand Down