From 9ddf075366338f25f6996a39425d332d64689ad4 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Mon, 10 Nov 2014 11:27:50 +0100 Subject: [PATCH] Qualify id, ip and port options with 'bootstrap.node.*' This change clarifies the relationship between the Bitsquare node that is being run (the local node) and the Bitsquare node that the local node is being bootstrapped against (the bootstrap node). Prior to this change, customizing bootstrap node looked like this: java -jar bitsquare.jar --ip=203.0.113.3 Now it looks like this: java -jar bitsquare.jar --bootstrap.node.ip=203.0.113.3 This change also removes entirely the short option strings (-d, -s, -p, -i) for simplicity and clarity while these values are undergoing change. By qualifying bootstrap node options explicitly in this fashion, we make way for customizing the the same values against the local node. These changes will come with subsequent commits. --- src/main/java/io/bitsquare/app/ArgumentParser.java | 8 ++++---- .../java/io/bitsquare/msg/tomp2p/TomP2PMessageModule.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/bitsquare/app/ArgumentParser.java b/src/main/java/io/bitsquare/app/ArgumentParser.java index b8a472d184..749bc4b745 100644 --- a/src/main/java/io/bitsquare/app/ArgumentParser.java +++ b/src/main/java/io/bitsquare/app/ArgumentParser.java @@ -34,15 +34,15 @@ public class ArgumentParser { .description("Bitsquare - The decentralized bitcoin exchange"); // Args for seed node config - parser.addArgument("-d", "--" + BOOTSTRAP_NODE_ID_KEY) + parser.addArgument("--" + BOOTSTRAP_NODE_ID_KEY) .help("Seed node ID"); - parser.addArgument("-s", "--" + BOOTSTRAP_NODE_IP_KEY) + parser.addArgument("--" + BOOTSTRAP_NODE_IP_KEY) .help("Seed node IP"); - parser.addArgument("-p", "--" + BOOTSTRAP_NODE_PORT_KEY) + parser.addArgument("--" + BOOTSTRAP_NODE_PORT_KEY) .help("Seed node port"); // A custom network interface (needed at the moment for windows, but might be useful also later) - parser.addArgument("-i", "--" + NETWORK_INTERFACE_KEY) + parser.addArgument("--" + NETWORK_INTERFACE_KEY) .help("Network interface"); // Args for app config diff --git a/src/main/java/io/bitsquare/msg/tomp2p/TomP2PMessageModule.java b/src/main/java/io/bitsquare/msg/tomp2p/TomP2PMessageModule.java index 272ed988f1..39d0c23b95 100644 --- a/src/main/java/io/bitsquare/msg/tomp2p/TomP2PMessageModule.java +++ b/src/main/java/io/bitsquare/msg/tomp2p/TomP2PMessageModule.java @@ -32,9 +32,9 @@ import static io.bitsquare.network.BootstrapNodes.DEFAULT_BOOTSTRAP_NODE; public class TomP2PMessageModule extends MessageModule { - public static final String BOOTSTRAP_NODE_ID_KEY = "id"; - public static final String BOOTSTRAP_NODE_IP_KEY = "ip"; - public static final String BOOTSTRAP_NODE_PORT_KEY = "port"; + public static final String BOOTSTRAP_NODE_ID_KEY = "bootstrap.node.id"; + public static final String BOOTSTRAP_NODE_IP_KEY = "bootstrap.node.ip"; + public static final String BOOTSTRAP_NODE_PORT_KEY = "bootstrap.node.port"; public static final String NETWORK_INTERFACE_KEY = BootstrappedPeerFactory.NETWORK_INTERFACE_KEY; public TomP2PMessageModule(Properties properties) {