]> Git Repo - VerusCoin.git/blobdiff - src/pbaas/crosschainrpc.cpp
Ability to define, list, start and connect to PBaaS chains
[VerusCoin.git] / src / pbaas / crosschainrpc.cpp
index 96769e9c62b73695ac080d6de318f14a529af194..207fa4aea47f2a442830232fe80ee797c748472c 100644 (file)
@@ -241,3 +241,52 @@ UniValue RPCCallRoot(const string& strMethod, const UniValue& params)
     }
     return UniValue(UniValue::VNULL);
 }
+
+int32_t uni_get_int(UniValue uv, int32_t def)
+{
+    try
+    {
+        return uv.get_int();
+    }
+    catch(const std::exception& e)
+    {
+        return def;
+    }
+}
+
+int64_t uni_get_int64(UniValue uv, int64_t def)
+{
+    try
+    {
+        return uv.get_int64();
+    }
+    catch(const std::exception& e)
+    {
+        return def;
+    }
+}
+
+std::string uni_get_str(UniValue uv, std::string def)
+{
+    try
+    {
+        return uv.get_str();
+    }
+    catch(const std::exception& e)
+    {
+        return def;
+    }
+}
+
+std::vector<UniValue> uni_getValues(UniValue uv, std::vector<UniValue> def)
+{
+    try
+    {
+        return uv.getValues();
+    }
+    catch(const std::exception& e)
+    {
+        return def;
+    }
+}
+
This page took 0.024464 seconds and 4 git commands to generate.