diff options
author | darosior <darosior@gmail.com> | 2019-03-01 17:06:27 +0100 |
---|---|---|
committer | darosior <darosior@protonmail.com> | 2019-09-05 15:11:48 +0200 |
commit | 6564f58c87a84c88d07629e9d86e15f07d0ed837 (patch) | |
tree | d503b9c772a8ba8d6dfc1d17b7048f5ec2602fd0 /src/rpc/util.cpp | |
parent | 6519be605480fec95dcd814771038efcb1ad2abe (diff) |
rpc/net: decode the services flags in a new entry
Diffstat (limited to 'src/rpc/util.cpp')
-rw-r--r-- | src/rpc/util.cpp | 18 |
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; +} |