mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge bitcoin/bitcoin#26074: refactor: Set RPCArg options with designated initializers
fa2c72dda0rpc: Set RPCArg options with designated initializers (MacroFake) Pull request description: For optional constructor arguments, use a new struct. This comes with two benefits: * Earlier unused optional arguments can be omitted * Designated initializers can be used ACKs for top commit: stickies-v: re-ACKfa2c72dda0Tree-SHA512: 2a0619548187cc7437fee2466ac4780746490622f202659f53641be01bc2a1fea4416d1a77f3e963bf7c4cce62899b61fab0b9683440cf82f68be44f63826658
This commit is contained in:
@@ -317,7 +317,7 @@ RPCHelpMan sendmany()
|
||||
"\nSend multiple times. Amounts are double-precision floating point numbers." +
|
||||
HELP_REQUIRING_PASSPHRASE,
|
||||
{
|
||||
{"dummy", RPCArg::Type::STR, RPCArg::Optional::NO, "Must be set to \"\" for backwards compatibility.", "\"\""},
|
||||
{"dummy", RPCArg::Type::STR, RPCArg::Optional::NO, "Must be set to \"\" for backwards compatibility.", RPCArgOptions{.oneline_description="\"\""}},
|
||||
{"amounts", RPCArg::Type::OBJ_USER_KEYS, RPCArg::Optional::NO, "The addresses and amounts",
|
||||
{
|
||||
{"address", RPCArg::Type::AMOUNT, RPCArg::Optional::NO, "The bitcoin address is the key, the numeric amount (can be string) in " + CURRENCY_UNIT + " is the value"},
|
||||
@@ -774,7 +774,7 @@ RPCHelpMan fundrawtransaction()
|
||||
},
|
||||
},
|
||||
FundTxDoc()),
|
||||
"options"},
|
||||
RPCArgOptions{.oneline_description="options"}},
|
||||
{"iswitness", RPCArg::Type::BOOL, RPCArg::DefaultHint{"depends on heuristic tests"}, "Whether the transaction hex is a serialized witness transaction.\n"
|
||||
"If iswitness is not present, heuristic tests will be used in decoding.\n"
|
||||
"If true, only witness deserialization will be tried.\n"
|
||||
@@ -968,7 +968,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
|
||||
{"estimate_mode", RPCArg::Type::STR, RPCArg::Default{"unset"}, "The fee estimate mode, must be one of (case insensitive):\n"
|
||||
"\"" + FeeModes("\"\n\"") + "\""},
|
||||
},
|
||||
"options"},
|
||||
RPCArgOptions{.oneline_description="options"}},
|
||||
},
|
||||
RPCResult{
|
||||
RPCResult::Type::OBJ, "", "", Cat(
|
||||
@@ -1173,7 +1173,7 @@ RPCHelpMan send()
|
||||
},
|
||||
},
|
||||
FundTxDoc()),
|
||||
"options"},
|
||||
RPCArgOptions{.oneline_description="options"}},
|
||||
},
|
||||
RPCResult{
|
||||
RPCResult::Type::OBJ, "", "",
|
||||
@@ -1281,7 +1281,7 @@ RPCHelpMan sendall()
|
||||
},
|
||||
FundTxDoc()
|
||||
),
|
||||
"options"
|
||||
RPCArgOptions{.oneline_description="options"}
|
||||
},
|
||||
},
|
||||
RPCResult{
|
||||
@@ -1611,7 +1611,7 @@ RPCHelpMan walletcreatefundedpsbt()
|
||||
},
|
||||
},
|
||||
FundTxDoc()),
|
||||
"options"},
|
||||
RPCArgOptions{.oneline_description="options"}},
|
||||
{"bip32derivs", RPCArg::Type::BOOL, RPCArg::Default{true}, "Include BIP 32 derivation paths for public keys if we know them"},
|
||||
},
|
||||
RPCResult{
|
||||
|
||||
Reference in New Issue
Block a user