Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoind.cpp
Show First 20 Lines • Show All 111 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 false; | return false; | ||||
} | } | ||||
// Check for -testnet or -regtest parameter (Params() calls are only | // Check for -testnet or -regtest parameter (Params() calls are only | ||||
// valid after this clause) | // valid after this clause) | ||||
try { | try { | ||||
SelectParams(ChainNameFromCommandLine()); | SelectParams(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 false; | return false; | ||||
} | } | ||||
// Error out when loose non-argument tokens are encountered on command | // Error out when loose non-argument tokens are encountered on command | ||||
// line | // line | ||||
for (int i = 1; i < argc; i++) { | for (int i = 1; i < argc; i++) { | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |