Skip to content

Commit

Permalink
Remove --desktopWith{Grpc|Http}Api options for now
Browse files Browse the repository at this point in the history
The previous commit introduces the BisqGrpcServer as a proof of concept,
but it is not yet ready for production use. This commit removes the
`--desktopWithGrpcApi` option that starts the gRPC server until such
time that it is production-ready.

This change also removes the `--desktopWithHttpApi` option for starting
an HTTP API server. The option has been in place for some time, but it
was 'false advertising' in the sense that nothing actually happened if
the user specified it, because there is in fact no HTTP API
implementation to be started.

Note that when the gRPC API option is reintroduced, it will be renamed
to `--rpcserver` or similar, following the convention in Bitcoin Core.
  • Loading branch information
cbeams committed Jan 10, 2020
1 parent 5c02ce5 commit 65175a7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 42 deletions.
2 changes: 0 additions & 2 deletions core/src/main/java/bisq/core/app/AppOptionKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
package bisq.core.app;

public class AppOptionKeys {
public static final String DESKTOP_WITH_HTTP_API = "desktopWithHttpApi";
public static final String DESKTOP_WITH_GRPC_API = "desktopWithGrpcApi";
public static final String APP_NAME_KEY = "appName";
public static final String USER_DATA_DIR_KEY = "userDataDir";
public static final String APP_DATA_DIR_KEY = "appDataDir";
Expand Down
6 changes: 0 additions & 6 deletions core/src/main/java/bisq/core/app/BisqEnvironment.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ public static boolean isDaoActivated(Environment environment) {
@Setter
protected boolean isBitcoinLocalhostNodeRunning;
@Getter
protected String desktopWithHttpApi, desktopWithGrpcApi;
@Getter
protected List<String> bannedSeedNodes, bannedBtcNodes, bannedPriceRelayNodes;

protected final String btcNodes, seedNodes, ignoreDevMsg, useDevPrivilegeKeys, useDevMode, useTorForBtc, rpcUser, rpcPassword,
Expand Down Expand Up @@ -219,8 +217,6 @@ public BisqEnvironment(PropertySource commandLineProperties) {
appDataDir = getProperty(commandLineProperties, AppOptionKeys.APP_DATA_DIR_KEY, appDataDir(userDataDir, appName));
staticAppDataDir = appDataDir;

desktopWithHttpApi = getProperty(commandLineProperties, AppOptionKeys.DESKTOP_WITH_HTTP_API, "false");
desktopWithGrpcApi = getProperty(commandLineProperties, AppOptionKeys.DESKTOP_WITH_GRPC_API, "false");
ignoreDevMsg = getProperty(commandLineProperties, AppOptionKeys.IGNORE_DEV_MSG_KEY, "");
useDevPrivilegeKeys = getProperty(commandLineProperties, AppOptionKeys.USE_DEV_PRIVILEGE_KEYS, "");
referralId = getProperty(commandLineProperties, AppOptionKeys.REFERRAL_ID, "");
Expand Down Expand Up @@ -398,8 +394,6 @@ private PropertySource<?> defaultProperties() {
setProperty(NetworkOptionKeys.SEND_MSG_THROTTLE_SLEEP, sendMsgThrottleSleep);

setProperty(AppOptionKeys.APP_DATA_DIR_KEY, appDataDir);
setProperty(AppOptionKeys.DESKTOP_WITH_HTTP_API, desktopWithHttpApi);
setProperty(AppOptionKeys.DESKTOP_WITH_GRPC_API, desktopWithGrpcApi);
setProperty(AppOptionKeys.IGNORE_DEV_MSG_KEY, ignoreDevMsg);
setProperty(AppOptionKeys.USE_DEV_PRIVILEGE_KEYS, useDevPrivilegeKeys);
setProperty(AppOptionKeys.REFERRAL_ID, referralId);
Expand Down
10 changes: 0 additions & 10 deletions core/src/main/java/bisq/core/app/BisqExecutable.java
Original file line number Diff line number Diff line change
Expand Up @@ -446,16 +446,6 @@ protected void customizeOptionParsing(OptionParser parser) {
.withRequiredArg()
.ofType(boolean.class);

parser.accepts(AppOptionKeys.DESKTOP_WITH_HTTP_API,
format("If set to true Bisq Desktop starts with Http API (default: %s)", "false"))
.withRequiredArg()
.ofType(boolean.class);

parser.accepts(AppOptionKeys.DESKTOP_WITH_GRPC_API,
format("If set to true Bisq Desktop starts with gRPC API (default: %s)", "false"))
.withRequiredArg()
.ofType(boolean.class);

parser.accepts(AppOptionKeys.USE_DEV_PRIVILEGE_KEYS,
format("If that is true all the privileged features which requires a private key " +
"to enable it are overridden by a dev key pair (This is for developers only!) (default: %s)", "false"))
Expand Down
26 changes: 2 additions & 24 deletions desktop/src/main/java/bisq/desktop/app/BisqAppMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import bisq.desktop.common.view.guice.InjectorViewFactory;
import bisq.desktop.setup.DesktopPersistedDataHost;

import bisq.core.CoreApi;
import bisq.core.app.BisqExecutable;

import bisq.common.UserThread;
Expand All @@ -37,12 +36,6 @@

import lombok.extern.slf4j.Slf4j;

import javax.annotation.Nullable;



import bisq.grpc.BisqGrpcServer;

@Slf4j
public class BisqAppMain extends BisqExecutable {
private BisqApp application;
Expand All @@ -51,11 +44,6 @@ public BisqAppMain() {
super("Bisq Desktop", "bisq-desktop", Version.VERSION);
}

/* @Nullable
private BisqHttpApiServer bisqHttpApiServer;*/
@Nullable
private BisqGrpcServer bisqGrpcServer;

public static void main(String[] args) throws Exception {
if (BisqExecutable.setupInitialOptionParser(args)) {
// For some reason the JavaFX launch process results in us losing the thread context class loader: reset it.
Expand Down Expand Up @@ -142,21 +130,11 @@ protected void startApplication() {
protected void onApplicationStarted() {
super.onApplicationStarted();

/* if (runWithHttpApi()) {
bisqHttpApiServer = new BisqHttpApiServer();
}*/

/*
if (runWithGrpcApi()) {
CoreApi coreApi = injector.getInstance(CoreApi.class);
bisqGrpcServer = new BisqGrpcServer(coreApi);
}
}

private boolean runWithHttpApi() {
return bisqEnvironment.getDesktopWithHttpApi().toLowerCase().equals("true");
}

private boolean runWithGrpcApi() {
return bisqEnvironment.getDesktopWithGrpcApi().toLowerCase().equals("true");
*/
}
}

0 comments on commit 65175a7

Please sign in to comment.