Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-cli.cpp
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | static int AppInitRPC(int argc, char *argv[]) { | ||||
} | } | ||||
if (!fs::is_directory(GetDataDir(false))) { | if (!fs::is_directory(GetDataDir(false))) { | ||||
fprintf(stderr, | fprintf(stderr, | ||||
"Error: Specified data directory \"%s\" does not exist.\n", | "Error: Specified data directory \"%s\" does not exist.\n", | ||||
gArgs.GetArg("-datadir", "").c_str()); | gArgs.GetArg("-datadir", "").c_str()); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
} | } | ||||
try { | try { | ||||
gArgs.ReadConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME)); | gArgs.ReadConfigFiles(); | ||||
} 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(gArgs.GetChainName()); | SelectBaseParams(gArgs.GetChainName()); | ||||
▲ Show 20 Lines • Show All 438 Lines • Show Last 20 Lines |