diff options
Diffstat (limited to 'src/rpc/util.cpp')
-rw-r--r-- | src/rpc/util.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 860fa198d5..39bf05fbbd 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -843,16 +843,9 @@ 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"); + for (const auto& flag : serviceFlagsToStr(services)) { + servicesNames.push_back(flag); + } return servicesNames; } |