aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/util.cpp')
-rw-r--r--src/rpc/util.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp
index 22d67c34da..adda90c104 100644
--- a/src/rpc/util.cpp
+++ b/src/rpc/util.cpp
@@ -733,3 +733,21 @@ std::vector<CScript> EvalDescriptorStringOrObject(const UniValue& scanobject, Fl
}
return ret;
}
+
+UniValue GetServicesNames(ServiceFlags services)
+{
+ UniValue servicesNames(UniValue::VARR);
+
+ if (services & NODE_NETWORK)
+ servicesNames.push_back("NETWORK");
+ if (services & NODE_GETUTXO)
+ servicesNames.push_back("GETUTXO");
+ if (services & NODE_BLOOM)
+ servicesNames.push_back("BLOOM");
+ if (services & NODE_WITNESS)
+ servicesNames.push_back("WITNESS");
+ if (services & NODE_NETWORK_LIMITED)
+ servicesNames.push_back("NETWORK_LIMITED");
+
+ return servicesNames;
+}