mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Extract MessageModule.BOOTSTRAP_NODE_KEY constant
This commit is contained in:
parent
05a86f251f
commit
9f2e9de94f
@ -34,6 +34,8 @@ public abstract class MessageModule extends BitsquareModule {
|
||||
public static final String BOOTSTRAP_NODE_PORT_KEY = "port";
|
||||
public static final String NETWORK_INTERFACE_KEY = "networkInterface";
|
||||
|
||||
public static final String BOOTSTRAP_NODE_KEY = "bootstrapNode";
|
||||
|
||||
protected MessageModule(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
@ -52,7 +54,7 @@ public abstract class MessageModule extends BitsquareModule {
|
||||
);
|
||||
|
||||
bind(Node.class)
|
||||
.annotatedWith(Names.named("bootstrapNode"))
|
||||
.annotatedWith(Names.named(BOOTSTRAP_NODE_KEY))
|
||||
.toInstance(bootstrapNode);
|
||||
|
||||
bind(String.class)
|
||||
|
@ -68,6 +68,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static io.bitsquare.msg.MessageModule.BOOTSTRAP_NODE_KEY;
|
||||
|
||||
/**
|
||||
* Creates a DHT peer and bootstrap to the network via a seed node
|
||||
*/
|
||||
@ -91,7 +93,7 @@ class BootstrappedPeerFactory {
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Inject
|
||||
public BootstrappedPeerFactory(Persistence persistence, @Named("bootstrapNode") Node bootstrapNode,
|
||||
public BootstrappedPeerFactory(Persistence persistence, @Named(BOOTSTRAP_NODE_KEY) Node bootstrapNode,
|
||||
@Named("networkInterface") String networkInterface) {
|
||||
this.persistence = persistence;
|
||||
this.bootstrapNode = bootstrapNode;
|
||||
|
Loading…
Reference in New Issue
Block a user