Add ParseRange function to parse args of the form int/[int,int]

This commit is contained in:
Pieter Wuille
2019-02-27 13:41:41 -08:00
parent 29c24b05fb
commit 7aa6a8aefb
2 changed files with 17 additions and 0 deletions

View File

@@ -38,6 +38,9 @@ unsigned int ParseConfirmTarget(const UniValue& value);
RPCErrorCode RPCErrorFromTransactionError(TransactionError terr);
UniValue JSONRPCTransactionError(TransactionError terr, const std::string& err_string = "");
//! Parse a JSON range specified as int64, or [int64, int64]
std::pair<int64_t, int64_t> ParseRange(const UniValue& value);
struct RPCArg {
enum class Type {
OBJ,