aboutsummaryrefslogtreecommitdiff
path: root/src/net_permissions.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-06-05 14:28:21 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-06-09 15:39:44 +0200
commit425e7cb8cf6140e03802a96d2be9a8b4aa2e244a (patch)
tree5cfb394b51cdf2c33c1a1e1397bb1ca881409c81 /src/net_permissions.cpp
parent77b79fa6ef60d363ca720cef5473f1a2c45099a3 (diff)
refactor: Put`TryParsePermissionFlags` in anonymous namespace
It's only used inside `net_permissions.cpp`.
Diffstat (limited to 'src/net_permissions.cpp')
-rw-r--r--src/net_permissions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net_permissions.cpp b/src/net_permissions.cpp
index 1871cd6d36..da09149856 100644
--- a/src/net_permissions.cpp
+++ b/src/net_permissions.cpp
@@ -16,6 +16,8 @@ const std::vector<std::string> NET_PERMISSIONS_DOC{
"mempool (allow requesting BIP35 mempool contents)",
};
+namespace {
+
// The parse the following format "perm1,perm2@xxxxxx"
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;
}
+}
+
std::vector<std::string> NetPermissions::ToStrings(NetPermissionFlags flags)
{
std::vector<std::string> strings;