mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Merge bitcoin/bitcoin#29997: rpc: Remove index-based Arg accessor
fa3169b073rpc: Remove index-based Arg accessor (MarcoFalke) Pull request description: The index-based Arg accessor is redundant with the name-based one. It does not provide any benefit to the code reader, or otherwise, so remove it. ACKs for top commit: stickies-v: re-ACKfa3169b073, addressed doc nits achow101: ACKfa3169b073ryanofsky: Code review ACKfa3169b073. One changes since last review are some documentation improvements Tree-SHA512: f9da1c049dbf38c3b47a8caf8d24d195c2d4b88c7ec45a9ccfb78f1e39f29cb86869f84b308f6e49856b074c06604ab634c90eb89c9c93d2a8169e070aa1bd40
This commit is contained in:
@@ -677,7 +677,7 @@ static const UniValue* DetailMaybeArg(CheckFn* check, const std::vector<RPCArg>&
|
||||
|
||||
static void CheckRequiredOrDefault(const RPCArg& param)
|
||||
{
|
||||
// Must use `Arg<Type>(i)` to get the argument or its default value.
|
||||
// Must use `Arg<Type>(key)` to get the argument or its default value.
|
||||
const bool required{
|
||||
std::holds_alternative<RPCArg::Optional>(param.m_fallback) && RPCArg::Optional::NO == std::get<RPCArg::Optional>(param.m_fallback),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user