mirror of
https://github.com/bisq-network/bisq.git
synced 2025-01-19 14:44:10 +01:00
rename bootstrap module to seednode
This commit is contained in:
parent
9f5634fa90
commit
0c791cd07b
@ -15,7 +15,7 @@ cp gui/target/shaded.jar "/Users/mk/vm_shared_windows/Bitsquare-$version.jar"
|
||||
cp gui/target/shaded.jar "/Users/mk/vm_shared_ubuntu14_32bit/Bitsquare-$version.jar"
|
||||
cp gui/target/shaded.jar "/Users/mk/vm_shared_windows_32bit/Bitsquare-$version.jar"
|
||||
|
||||
cp seednode/target/SeedNode.jar "gui/deploy/SeedNode.jar"
|
||||
cp seednode/target/SeedNode.jar "gui/deploy/SeedNode-$version.jar"
|
||||
|
||||
cp jdkfix/target/jdkfix-$version.jar "/Users/mk/vm_shared_ubuntu/jdkfix-$version.jar"
|
||||
cp jdkfix/target/jdkfix-$version.jar "/Users/mk/vm_shared_windows/jdkfix-$version.jar"
|
||||
@ -47,6 +47,4 @@ rm "gui/deploy/Bitsquare.jnlp"
|
||||
mv "gui/deploy/bundles/Bitsquare-$version.dmg" "gui/deploy/Bitsquare-$version.dmg"
|
||||
rm -r "gui/deploy/bundles"
|
||||
|
||||
mv "gui/deploy/SeedNode.jar" "gui/deploy/SeedNode-$version.jar"
|
||||
|
||||
cd package/mac
|
2
pom.xml
2
pom.xml
@ -46,7 +46,7 @@
|
||||
<module>network</module>
|
||||
<module>gui</module>
|
||||
<module>headless</module>
|
||||
<module>bootstrap</module>
|
||||
<module>seednode</module>
|
||||
<module>monitor</module>
|
||||
<module>jdkfix</module>
|
||||
</modules>
|
||||
|
@ -9,7 +9,7 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>bootstrap</artifactId>
|
||||
<artifactId>seednode</artifactId>
|
||||
|
||||
<build>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
<transformers>
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>io.bitsquare.bootstrap.BootstrapMain</mainClass>
|
||||
<mainClass>io.bitsquare.seednode.SeedNodeMain</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
<filters>
|
||||
@ -66,7 +66,7 @@
|
||||
<configuration>
|
||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
<shadedClassifierName>bundled</shadedClassifierName>
|
||||
<finalName>Bootstrap</finalName>
|
||||
<finalName>SeedNode</finalName>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
@ -1,4 +1,4 @@
|
||||
package io.bitsquare.bootstrap;
|
||||
package io.bitsquare.seednode;
|
||||
|
||||
import ch.qos.logback.classic.Level;
|
||||
import com.google.inject.Guice;
|
||||
@ -24,19 +24,19 @@ import org.springframework.core.env.Environment;
|
||||
import java.nio.file.Paths;
|
||||
import java.security.Security;
|
||||
|
||||
public class Bootstrap {
|
||||
private static final Logger log = LoggerFactory.getLogger(Bootstrap.class);
|
||||
public class SeedNode {
|
||||
private static final Logger log = LoggerFactory.getLogger(SeedNode.class);
|
||||
private static Environment env;
|
||||
private final Injector injector;
|
||||
private final BootstrapModule bootstrapModule;
|
||||
private final SeedNodeModule seedNodeModule;
|
||||
|
||||
private P2PService p2pService;
|
||||
|
||||
public static void setEnvironment(Environment env) {
|
||||
Bootstrap.env = env;
|
||||
SeedNode.env = env;
|
||||
}
|
||||
|
||||
public Bootstrap() {
|
||||
public SeedNode() {
|
||||
String logPath = Paths.get(env.getProperty(BitsquareEnvironment.APP_DATA_DIR_KEY), "bitsquare").toString();
|
||||
Log.setup(logPath);
|
||||
log.info("Log files under: " + logPath);
|
||||
@ -66,8 +66,8 @@ public class Bootstrap {
|
||||
Security.addProvider(new BouncyCastleProvider());
|
||||
|
||||
|
||||
bootstrapModule = new BootstrapModule(env);
|
||||
injector = Guice.createInjector(bootstrapModule);
|
||||
seedNodeModule = new SeedNodeModule(env);
|
||||
injector = Guice.createInjector(seedNodeModule);
|
||||
Version.setBtcNetworkId(injector.getInstance(BitsquareEnvironment.class).getBitcoinNetwork().ordinal());
|
||||
p2pService = injector.getInstance(P2PService.class);
|
||||
p2pService.start(false, new P2PServiceListener() {
|
||||
@ -132,7 +132,7 @@ public class Bootstrap {
|
||||
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
||||
injector.getInstance(P2PService.class).shutDown(() -> {
|
||||
injector.getInstance(WalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
||||
bootstrapModule.close(injector);
|
||||
seedNodeModule.close(injector);
|
||||
log.info("Graceful shutdown completed");
|
||||
resultHandler.handleResult();
|
||||
});
|
@ -15,7 +15,7 @@
|
||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package io.bitsquare.bootstrap;
|
||||
package io.bitsquare.seednode;
|
||||
|
||||
import io.bitsquare.app.BitsquareEnvironment;
|
||||
import io.bitsquare.app.BitsquareExecutable;
|
||||
@ -29,9 +29,9 @@ import java.util.Scanner;
|
||||
|
||||
import static io.bitsquare.app.BitsquareEnvironment.*;
|
||||
|
||||
public class BootstrapMain extends BitsquareExecutable {
|
||||
private static final Logger log = LoggerFactory.getLogger(BootstrapMain.class);
|
||||
private io.bitsquare.bootstrap.Bootstrap bootstrap;
|
||||
public class SeedNodeMain extends BitsquareExecutable {
|
||||
private static final Logger log = LoggerFactory.getLogger(SeedNodeMain.class);
|
||||
private SeedNode seedNode;
|
||||
private boolean isStopped;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
@ -63,15 +63,15 @@ public class BootstrapMain extends BitsquareExecutable {
|
||||
|
||||
// For some reason the JavaFX launch process results in us losing the thread context class loader: reset it.
|
||||
// In order to work around a bug in JavaFX 8u25 and below, you must include the following code as the first line of your realMain method:
|
||||
Thread.currentThread().setContextClassLoader(BootstrapMain.class.getClassLoader());
|
||||
Thread.currentThread().setContextClassLoader(SeedNodeMain.class.getClassLoader());
|
||||
|
||||
new BootstrapMain().execute(args);
|
||||
new SeedNodeMain().execute(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doExecute(OptionSet options) {
|
||||
io.bitsquare.bootstrap.Bootstrap.setEnvironment(new BitsquareEnvironment(options));
|
||||
bootstrap = new io.bitsquare.bootstrap.Bootstrap();
|
||||
SeedNode.setEnvironment(new BitsquareEnvironment(options));
|
||||
seedNode = new SeedNode();
|
||||
|
||||
while (!isStopped) {
|
||||
try {
|
||||
@ -79,7 +79,7 @@ public class BootstrapMain extends BitsquareExecutable {
|
||||
while (scanner.hasNextLine()) {
|
||||
String inputString = scanner.nextLine();
|
||||
if (inputString.equals("q")) {
|
||||
bootstrap.shutDown();
|
||||
seedNode.shutDown();
|
||||
isStopped = true;
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
* along with Bitsquare. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package io.bitsquare.bootstrap;
|
||||
package io.bitsquare.seednode;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
import io.bitsquare.alert.AlertModule;
|
||||
@ -42,10 +42,10 @@ import java.io.File;
|
||||
|
||||
import static com.google.inject.name.Names.named;
|
||||
|
||||
class BootstrapModule extends AppModule {
|
||||
private static final Logger log = LoggerFactory.getLogger(BootstrapModule.class);
|
||||
class SeedNodeModule extends AppModule {
|
||||
private static final Logger log = LoggerFactory.getLogger(SeedNodeModule.class);
|
||||
|
||||
public BootstrapModule(Environment env) {
|
||||
public SeedNodeModule(Environment env) {
|
||||
super(env);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user