Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/init.cpp
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | gArgs.AddArg( | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, OptionsCategory::WALLET); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-spendzeroconfchange", | "-spendzeroconfchange", | ||||
strprintf( | strprintf( | ||||
"Spend unconfirmed change when sending transactions (default: %d)", | "Spend unconfirmed change when sending transactions (default: %d)", | ||||
DEFAULT_SPEND_ZEROCONF_CHANGE), | DEFAULT_SPEND_ZEROCONF_CHANGE), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::WALLET); | ArgsManager::ALLOW_ANY, OptionsCategory::WALLET); | ||||
gArgs.AddArg("-upgradewallet", "Upgrade wallet to latest format on startup", | |||||
ArgsManager::ALLOW_ANY, OptionsCategory::WALLET); | |||||
gArgs.AddArg("-wallet=<path>", | gArgs.AddArg("-wallet=<path>", | ||||
"Specify wallet database path. Can be specified multiple " | "Specify wallet database path. Can be specified multiple " | ||||
"times to load multiple wallets. Path is interpreted relative " | "times to load multiple wallets. Path is interpreted relative " | ||||
"to <walletdir> if it is not absolute, and will be created if " | "to <walletdir> if it is not absolute, and will be created if " | ||||
"it does not exist (as a directory containing a wallet.dat " | "it does not exist (as a directory containing a wallet.dat " | ||||
"file and log files). For backwards compatibility this will " | "file and log files). For backwards compatibility this will " | ||||
"also accept names of existing data files in <walletdir>.)", | "also accept names of existing data files in <walletdir>.)", | ||||
ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, | ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, | ||||
▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | if (zapwallettxes) { | ||||
} | } | ||||
if (gArgs.SoftSetBoolArg("-rescan", true)) { | if (gArgs.SoftSetBoolArg("-rescan", true)) { | ||||
LogPrintf("%s: parameter interaction: -zapwallettxes enabled -> " | LogPrintf("%s: parameter interaction: -zapwallettxes enabled -> " | ||||
"setting -rescan=1\n", | "setting -rescan=1\n", | ||||
__func__); | __func__); | ||||
} | } | ||||
} | } | ||||
if (is_multiwallet) { | |||||
if (gArgs.GetBoolArg("-upgradewallet", false)) { | |||||
return InitError( | |||||
strprintf("%s is only allowed with a single wallet file", | |||||
"-upgradewallet")); | |||||
} | |||||
} | |||||
if (gArgs.GetBoolArg("-sysperms", false)) { | if (gArgs.GetBoolArg("-sysperms", false)) { | ||||
return InitError("-sysperms is not allowed in combination with enabled " | return InitError("-sysperms is not allowed in combination with enabled " | ||||
"wallet functionality"); | "wallet functionality"); | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
Show All 9 Lines |