Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoind.cpp
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | try { | ||||
// valid after this clause) | // valid after this clause) | ||||
try { | try { | ||||
SelectParams(gArgs.GetChainName()); | 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; | ||||
} | } | ||||
// Make sure we create the net-specific data directory early on: if it | |||||
// is new, this has a side effect of also creating | |||||
// <datadir>/<net>/wallets/. | |||||
// | |||||
// TODO: this should be removed once GetDataDir() no longer creates the | |||||
// wallets/ subdirectory. | |||||
// See more info at: | |||||
// https://reviews.bitcoinabc.org/D3312 | |||||
GetDataDir(true); | |||||
// 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++) { | ||||
if (!IsSwitchChar(argv[i][0])) { | if (!IsSwitchChar(argv[i][0])) { | ||||
fprintf(stderr, | fprintf(stderr, | ||||
"Error: Command line contains unexpected token '%s', " | "Error: Command line contains unexpected token '%s', " | ||||
"see bitcoind -h for a list of options.\n", | "see bitcoind -h for a list of options.\n", | ||||
argv[i]); | argv[i]); | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |