aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-07-20 18:46:13 +0100
committerdergoegge <n.goeggi@gmail.com>2022-07-14 14:50:44 +0200
commitd9079fe18dc5d81ce290876353555b51125127d1 (patch)
tree9d9d45587a11737cfc7bded1126326ff97d59771 /src/rpc
parent7d1c0369340cb752f0d78e24f4251595534bf5e9 (diff)
downloadbitcoin-d9079fe18dc5d81ce290876353555b51125127d1.tar.xz
[net processing] Remove CNode::nServices
Use Peer::m_their_services instead
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/net.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index fad92629c5..27eea824bc 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -195,8 +195,9 @@ static RPCHelpMan getpeerinfo()
if (stats.m_mapped_as != 0) {
obj.pushKV("mapped_as", uint64_t(stats.m_mapped_as));
}
- obj.pushKV("services", strprintf("%016x", stats.nServices));
- obj.pushKV("servicesnames", GetServicesNames(stats.nServices));
+ ServiceFlags services{fStateStats ? statestats.their_services : ServiceFlags::NODE_NONE};
+ obj.pushKV("services", strprintf("%016x", services));
+ obj.pushKV("servicesnames", GetServicesNames(services));
obj.pushKV("lastsend", count_seconds(stats.m_last_send));
obj.pushKV("lastrecv", count_seconds(stats.m_last_recv));
obj.pushKV("last_transaction", count_seconds(stats.m_last_tx_time));