aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/util.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2019-02-27 13:41:41 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2019-02-28 13:00:09 -0800
commit7aa6a8aefbb2013ef3dc87ecbdf5d947d4b413af (patch)
treef0eec090a9f4d18a90e5508a24e1df53bca3e1de /src/rpc/util.h
parent29c24b05fb71a5577af9f58298493c1f2d489069 (diff)
Add ParseRange function to parse args of the form int/[int,int]
Diffstat (limited to 'src/rpc/util.h')
-rw-r--r--src/rpc/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/util.h b/src/rpc/util.h
index 06800ad63c..f11998bafa 100644
--- a/src/rpc/util.h
+++ b/src/rpc/util.h
@@ -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,