Commit 7733a261 authored by zeroleak's avatar zeroleak
Browse files

/rest/cli/config: remove 'clients'

parent ba879b8a
......@@ -26,7 +26,6 @@ public class ApiCliConfig {
private static final String KEY_SCODE = "cli.scode";
public static final String KEY_TOR = "cli.tor";
private static final String KEY_PROXY = "cli.proxy";
public static final String KEY_MIX_CLIENTS = "cli.mix.clients";
private static final String KEY_MIX_CLIENTS_PER_POOL = "cli.mix.clientsPerPool";
private static final String KEY_MIX_CLIENT_DELAY = "cli.mix.clientDelay";
private static final String KEY_MIX_TX0_MAX_OUTPUTS = "cli.mix.tx0MaxOutputs";
......@@ -124,7 +123,6 @@ public class ApiCliConfig {
}
public static class ApiMixConfig {
private Integer clients;
private Integer clientsPerPool;
private Integer clientDelay;
private Integer tx0MaxOutputs;
......@@ -134,7 +132,6 @@ public class ApiCliConfig {
public ApiMixConfig() {}
public ApiMixConfig(CliConfigFile.MixConfig mixConfig) {
this.clients = mixConfig.getClients();
this.clientsPerPool = mixConfig.getClientsPerPool();
this.clientDelay = mixConfig.getClientDelay();
this.tx0MaxOutputs = mixConfig.getTx0MaxOutputs();
......@@ -143,10 +140,6 @@ public class ApiCliConfig {
}
public void toProperties(Properties props) throws NotifiableException {
if (clients != null && clients < 1) {
throw new NotifiableException("mix.clients should be > 0 or null");
}
props.put(KEY_MIX_CLIENTS, clients != null ? Integer.toString(clients) : "");
if (clientsPerPool != null) {
if (clientsPerPool < 1) {
throw new NotifiableException("mix.clientsPerPool should be > 0");
......@@ -176,14 +169,6 @@ public class ApiCliConfig {
}
}
public Integer getClients() {
return clients;
}
public void setClients(Integer clients) {
this.clients = clients;
}
public Integer getClientsPerPool() {
return clientsPerPool;
}
......
package com.samourai.whirlpool.cli.run;
import com.samourai.whirlpool.cli.api.protocol.beans.ApiCliConfig;
import com.samourai.whirlpool.cli.config.CliConfig;
import com.samourai.whirlpool.cli.services.CliConfigService;
import java.lang.invoke.MethodHandles;
......@@ -34,7 +33,7 @@ public class RunUpgradeCli {
// unset mix.clients=
Properties props = cliConfigService.loadProperties();
props.put(ApiCliConfig.KEY_MIX_CLIENTS, "");
props.put(CliConfigService.KEY_MIX_CLIENTS, "");
cliConfigService.saveProperties(props);
}
}
......@@ -40,6 +40,7 @@ public class CliConfigService {
private static final String KEY_DOJO_APIKEY = "cli.dojo.apiKey";
public static final String KEY_DOJO_ENABLED = "cli.dojo.enabled";
private static final String KEY_VERSION = "cli.version";
public static final String KEY_MIX_CLIENTS = "cli.mix.clients";
private CliConfig cliConfig;
private CliStatus cliStatus;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment