aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-26 21:26:09 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-26 21:26:12 +0100
commit02cf20b9f571474c939d18a8b9d6b5d22479a222 (patch)
treea3c5797a72b177dce68192558e5f04636c548ca0 /src
parent43fc7a569c135a9f24db23e6fcbb30b839859094 (diff)
parent667d203687708390bc0f43f2dd3f4ab427b88338 (diff)
downloadbitcoin-02cf20b9f571474c939d18a8b9d6b5d22479a222.tar.xz
Merge #20756: [doc] Add missing field (permissions) to the getpeerinfo help
667d203687708390bc0f43f2dd3f4ab427b88338 [doc] Add permissions to the getpeerinfo help. (Amiti Uttarwar) Pull request description: This field was previously being returned, but missing from the RPCHelpMan. This PR uses the existing `NET_PERMISSIONS_DOC` to inform RPC users about this field. ``` "permissions" : [ (json array) Any special permissions that have been granted to this peer "str", (string) bloomfilter (allow requesting BIP37 filtered blocks and transactions), noban (do not ban for misbehavior; implies download), forcerelay (relay transactions that are already in the mempool; implies relay), relay (relay even in -blocksonly mode, and unlimited transaction announcements), mempool (allow requesting BIP35 mempool contents), download (allow getheaders during IBD, no disconnect after maxuploadtarget limit), addr (responses to GETADDR avoid hitting the cache and contain random records with the most up-to-date info). ... ], ``` ACKs for top commit: Sjors: tACK 667d203687708390bc0f43f2dd3f4ab427b88338 Tree-SHA512: 973631b41d35d6333e3cb06b35277de869110f6ad6498c7e74f00c75202e8de1788a48755c21ac964903e5e6050a5e769a63866211aec9004cd665a727a54a3c
Diffstat (limited to 'src')
-rw-r--r--src/rpc/net.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 333dcb52bd..2a2246b15f 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -143,6 +143,10 @@ static RPCHelpMan getpeerinfo()
}},
{RPCResult::Type::BOOL, "whitelisted", /* optional */ true, "Whether the peer is whitelisted with default permissions\n"
"(DEPRECATED, returned only if config option -deprecatedrpc=whitelisted is passed)"},
+ {RPCResult::Type::ARR, "permissions", "Any special permissions that have been granted to this peer",
+ {
+ {RPCResult::Type::STR, "permission_type", Join(NET_PERMISSIONS_DOC, ",\n") + ".\n"},
+ }},
{RPCResult::Type::NUM, "minfeefilter", "The minimum fee rate for transactions this peer accepts"},
{RPCResult::Type::OBJ_DYN, "bytessent_per_msg", "",
{