mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 10:42:23 +02:00
refactor: add unused ArgsManager to replace gArgs
This commit is contained in:
@ -36,14 +36,14 @@ static const int CONTINUE_EXECUTION=-1;
|
||||
|
||||
const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
|
||||
|
||||
static void SetupBitcoinTxArgs()
|
||||
static void SetupBitcoinTxArgs(ArgsManager &argsman)
|
||||
{
|
||||
SetupHelpOptions(gArgs);
|
||||
SetupHelpOptions(argsman);
|
||||
|
||||
gArgs.AddArg("-create", "Create new, empty TX.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
gArgs.AddArg("-json", "Select JSON output", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
gArgs.AddArg("-txid", "Output only the hex-encoded transaction id of the resultant transaction.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
SetupChainParamsBaseOptions();
|
||||
SetupChainParamsBaseOptions(argsman);
|
||||
|
||||
gArgs.AddArg("delin=N", "Delete input N from TX", ArgsManager::ALLOW_ANY, OptionsCategory::COMMANDS);
|
||||
gArgs.AddArg("delout=N", "Delete output N from TX", ArgsManager::ALLOW_ANY, OptionsCategory::COMMANDS);
|
||||
@ -81,7 +81,7 @@ static int AppInitRawTx(int argc, char* argv[])
|
||||
//
|
||||
// Parameters
|
||||
//
|
||||
SetupBitcoinTxArgs();
|
||||
SetupBitcoinTxArgs(gArgs);
|
||||
std::string error;
|
||||
if (!gArgs.ParseParameters(argc, argv, error)) {
|
||||
tfm::format(std::cerr, "Error parsing command line arguments: %s\n", error);
|
||||
|
Reference in New Issue
Block a user