mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
refactor: move verbosity parsing to rpc/util
Provides a common way for rpcs to obtain verbosity from an rpc parameter
This commit is contained in:
@@ -100,6 +100,15 @@ uint256 ParseHashO(const UniValue& o, std::string_view strKey);
|
||||
std::vector<unsigned char> ParseHexV(const UniValue& v, std::string_view name);
|
||||
std::vector<unsigned char> ParseHexO(const UniValue& o, std::string_view strKey);
|
||||
|
||||
/**
|
||||
* Parses verbosity from provided UniValue.
|
||||
*
|
||||
* @param[in] arg The verbosity argument as a bool (true) or int (0, 1, 2,...)
|
||||
* @param[in] default_verbosity The value to return if verbosity argument is null
|
||||
* @returns An integer describing the verbosity level (e.g. 0, 1, 2, etc.)
|
||||
*/
|
||||
int ParseVerbosity(const UniValue& arg, int default_verbosity);
|
||||
|
||||
/**
|
||||
* Validate and return a CAmount from a UniValue number or string.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user