Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-cli.cpp
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | try { | ||||
gArgs.ReadConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME)); | gArgs.ReadConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME)); | ||||
} catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
fprintf(stderr, "Error reading configuration file: %s\n", e.what()); | fprintf(stderr, "Error reading configuration file: %s\n", e.what()); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
} | } | ||||
// Check for -testnet or -regtest parameter (BaseParams() calls are only | // Check for -testnet or -regtest parameter (BaseParams() calls are only | ||||
// valid after this clause) | // valid after this clause) | ||||
try { | try { | ||||
SelectBaseParams(ChainNameFromCommandLine()); | SelectBaseParams(gArgs.GetChainName()); | ||||
} catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
fprintf(stderr, "Error: %s\n", e.what()); | fprintf(stderr, "Error: %s\n", e.what()); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
} | } | ||||
if (gArgs.GetBoolArg("-rpcssl", false)) { | if (gArgs.GetBoolArg("-rpcssl", false)) { | ||||
fprintf(stderr, | fprintf(stderr, | ||||
"Error: SSL mode for RPC (-rpcssl) is no longer supported.\n"); | "Error: SSL mode for RPC (-rpcssl) is no longer supported.\n"); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
▲ Show 20 Lines • Show All 324 Lines • Show Last 20 Lines |