diff options
author | nicolas.dorier <nicolas.dorier@gmail.com> | 2019-06-20 18:37:51 +0900 |
---|---|---|
committer | nicolas.dorier <nicolas.dorier@gmail.com> | 2019-08-11 11:33:27 +0900 |
commit | e5b26deaaa6842f7dd7c4537ede000f965ea0189 (patch) | |
tree | c45a24d8290b86ef74bb6b95287de5972768caa2 /src/rpc | |
parent | e5fdda68c6d2313edb74443f0d1e6d2ce2d97f5e (diff) |
Make whitebind/whitelist permissions more flexible
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/net.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 16b59e3d58..196e69066b 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -9,6 +9,7 @@ #include <core_io.h> #include <net.h> #include <net_processing.h> +#include <net_permissions.h> #include <netbase.h> #include <policy/policy.h> #include <policy/settings.h> @@ -178,6 +179,11 @@ static UniValue getpeerinfo(const JSONRPCRequest& request) obj.pushKV("inflight", heights); } obj.pushKV("whitelisted", stats.fWhitelisted); + UniValue permissions(UniValue::VARR); + for (const auto& permission : NetPermissions::ToStrings(stats.m_permissionFlags)) { + permissions.push_back(permission); + } + obj.pushKV("permissions", permissions); obj.pushKV("minfeefilter", ValueFromAmount(stats.minFeeFilter)); UniValue sendPerMsgCmd(UniValue::VOBJ); |