mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-03 23:03:24 +02:00
refactor: PutTryParsePermissionFlags
in anonymous namespace
It's only used inside `net_permissions.cpp`.
This commit is contained in:
@@ -16,6 +16,8 @@ const std::vector<std::string> NET_PERMISSIONS_DOC{
|
|||||||
"mempool (allow requesting BIP35 mempool contents)",
|
"mempool (allow requesting BIP35 mempool contents)",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
// The parse the following format "perm1,perm2@xxxxxx"
|
// The parse the following format "perm1,perm2@xxxxxx"
|
||||||
bool TryParsePermissionFlags(const std::string str, NetPermissionFlags& output, size_t& readen, bilingual_str& error)
|
bool TryParsePermissionFlags(const std::string str, NetPermissionFlags& output, size_t& readen, bilingual_str& error)
|
||||||
{
|
{
|
||||||
@@ -60,6 +62,8 @@ bool TryParsePermissionFlags(const std::string str, NetPermissionFlags& output,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<std::string> NetPermissions::ToStrings(NetPermissionFlags flags)
|
std::vector<std::string> NetPermissions::ToStrings(NetPermissionFlags flags)
|
||||||
{
|
{
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
|
Reference in New Issue
Block a user