mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 21:47:18 +00:00
Correct maven instruction in the README file and make ForwardingService work on mainnet again by fixing command line arg parsing.
Resolves issue 523.
This commit is contained in:
@@ -43,7 +43,7 @@ public class ForwardingService {
|
||||
public static void main(String[] args) throws Exception {
|
||||
// This line makes the log output more compact and easily read, especially when using the JDK log adapter.
|
||||
BriefLogFormatter.init();
|
||||
if (args.length < 2) {
|
||||
if (args.length < 1) {
|
||||
System.err.println("Usage: address-to-send-back-to [regtest|testnet]");
|
||||
return;
|
||||
}
|
||||
@@ -51,10 +51,10 @@ public class ForwardingService {
|
||||
// Figure out which network we should connect to. Each one gets its own set of files.
|
||||
NetworkParameters params;
|
||||
String filePrefix;
|
||||
if (args[1].equals("testnet")) {
|
||||
if (args.length > 1 && args[1].equals("testnet")) {
|
||||
params = TestNet3Params.get();
|
||||
filePrefix = "forwarding-service-testnet";
|
||||
} else if (args[1].equals("regtest")) {
|
||||
} else if (args.length > 1 && args[1].equals("regtest")) {
|
||||
params = RegTestParams.get();
|
||||
filePrefix = "forwarding-service-regtest";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user