mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
rpc/net: decode the services flags in a new entry
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user