diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-08-21 15:20:21 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-09-29 00:42:06 +0200 |
commit | a7ed00f8bbc07dfc09f9e0a5bae10a1afe7612bb (patch) | |
tree | f586c52e84cb02d5793ea757d5f88501a9c6d245 /src/rpc | |
parent | 30bc8fab6833e0447ceadd3fff1566a680e33a98 (diff) |
rpc: expose high-bandwidth mode states via getpeerinfo
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/net.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index def21b119e..8e0cb17628 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -116,6 +116,8 @@ static RPCHelpMan getpeerinfo() {RPCResult::Type::NUM, "version", "The peer version, such as 70001"}, {RPCResult::Type::STR, "subver", "The string version"}, {RPCResult::Type::BOOL, "inbound", "Inbound (true) or Outbound (false)"}, + {RPCResult::Type::BOOL, "bip152_hb_to", "Whether we selected peer as (compact blocks) high-bandwidth peer"}, + {RPCResult::Type::BOOL, "bip152_hb_from", "Whether peer selected us as (compact blocks) high-bandwidth peer"}, {RPCResult::Type::BOOL, "addnode", "Whether connection was due to addnode/-connect or if it was an automatic/inbound connection\n" "(DEPRECATED, returned only if the config option -deprecatedrpc=getpeerinfo_addnode is passed)"}, {RPCResult::Type::STR, "connection_type", "Type of connection: \n" + Join(CONNECTION_TYPE_DOC, ",\n") + "."}, @@ -198,6 +200,8 @@ static RPCHelpMan getpeerinfo() // their ver message. obj.pushKV("subver", stats.cleanSubVer); obj.pushKV("inbound", stats.fInbound); + obj.pushKV("bip152_hb_to", stats.m_bip152_highbandwidth_to); + obj.pushKV("bip152_hb_from", stats.m_bip152_highbandwidth_from); if (IsDeprecatedRPCEnabled("getpeerinfo_addnode")) { // addnode is deprecated in v0.21 for removal in v0.22 obj.pushKV("addnode", stats.m_manual_connection); |