diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2021-04-14 15:01:00 +0100 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2021-04-17 00:22:53 +0100 |
commit | f81ef4303e057e85aa24772c865287c17ffa4350 (patch) | |
tree | ff75b3ae7de4168e6892bae353a898121c267418 /src/rpc/util.h | |
parent | a12962ca894075ae203ab808db4ba5dab23346d1 (diff) | |
download | bitcoin-f81ef4303e057e85aa24772c865287c17ffa4350.tar.xz |
rpc: Keep default argument value in correct type
Diffstat (limited to 'src/rpc/util.h')
-rw-r--r-- | src/rpc/util.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/util.h b/src/rpc/util.h index 6e783e19fb..8ec18b2f35 100644 --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -145,7 +145,9 @@ struct RPCArg { */ OMITTED, }; - using Fallback = std::variant<Optional, /* default value for optional args */ std::string>; + using DefaultHint = std::string; + using Default = UniValue; + using Fallback = std::variant<Optional, /* hint for default value */ DefaultHint, /* default constant value */ Default>; const std::string m_names; //!< The name of the arg (can be empty for inner args, can contain multiple aliases separated by | for named request arguments) const Type m_type; const bool m_hidden; |