Rename BootstrapNode#{LOCAL_HOST => LOCALHOST}

This commit is contained in:
Chris Beams 2014-11-06 09:00:35 +01:00
parent 1ea30fb4ae
commit ce5155ebdc
No known key found for this signature in database
GPG key ID: 3D214F8F5BC5ED73
3 changed files with 6 additions and 3 deletions

View file

@ -56,7 +56,10 @@ public class SeedNode {
interfaceHint = namespace.getString(ArgumentParser.INTERFACE_HINT_FLAG); interfaceHint = namespace.getString(ArgumentParser.INTERFACE_HINT_FLAG);
int serverPort = Integer.valueOf(namespace.getString(ArgumentParser.PORT_FLAG)); int serverPort = Integer.valueOf(namespace.getString(ArgumentParser.PORT_FLAG));
String seedID = namespace.getString(ArgumentParser.PEER_ID_FLAG); String seedID = BootstrapNode.LOCALHOST.getId();
if (namespace.getString(ArgumentParser.PEER_ID_FLAG) != null) {
seedID = namespace.getString(ArgumentParser.PEER_ID_FLAG);
}
final Set<PeerAddress> peerAddresses = new HashSet<>(); final Set<PeerAddress> peerAddresses = new HashSet<>();
for (Node node : BootstrapNode.values()) { for (Node node : BootstrapNode.values()) {

View file

@ -44,7 +44,7 @@ public class DefaultMessageModule extends AbstractBitsquareModule implements Mes
bind(Node.class) bind(Node.class)
.annotatedWith(Names.named("bootstrapNode")) .annotatedWith(Names.named("bootstrapNode"))
.toInstance(BootstrapNode.LOCAL_HOST); .toInstance(BootstrapNode.LOCALHOST);
} }
@Override @Override

View file

@ -18,7 +18,7 @@
package io.bitsquare.network; package io.bitsquare.network;
public enum BootstrapNode implements Node { public enum BootstrapNode implements Node {
LOCAL_HOST("localhost", "127.0.0.1", 5000), LOCALHOST("localhost", "127.0.0.1", 5000),
DIGITAL_OCEAN1("digitalocean1.bitsquare.io", "188.226.179.109", 5000); DIGITAL_OCEAN1("digitalocean1.bitsquare.io", "188.226.179.109", 5000);
private final String id; private final String id;