mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
Make getpeerinfo field order consistent with its help (for v24 backport)
This also keeps it consistent with the last release (v23)
This commit is contained in:
parent
3d892d8695
commit
9cd6682545
1 changed files with 6 additions and 2 deletions
|
@ -200,6 +200,9 @@ static RPCHelpMan getpeerinfo()
|
||||||
ServiceFlags services{fStateStats ? statestats.their_services : ServiceFlags::NODE_NONE};
|
ServiceFlags services{fStateStats ? statestats.their_services : ServiceFlags::NODE_NONE};
|
||||||
obj.pushKV("services", strprintf("%016x", services));
|
obj.pushKV("services", strprintf("%016x", services));
|
||||||
obj.pushKV("servicesnames", GetServicesNames(services));
|
obj.pushKV("servicesnames", GetServicesNames(services));
|
||||||
|
if (fStateStats) {
|
||||||
|
obj.pushKV("relaytxes", statestats.m_relay_txs);
|
||||||
|
}
|
||||||
obj.pushKV("lastsend", count_seconds(stats.m_last_send));
|
obj.pushKV("lastsend", count_seconds(stats.m_last_send));
|
||||||
obj.pushKV("lastrecv", count_seconds(stats.m_last_recv));
|
obj.pushKV("lastrecv", count_seconds(stats.m_last_recv));
|
||||||
obj.pushKV("last_transaction", count_seconds(stats.m_last_tx_time));
|
obj.pushKV("last_transaction", count_seconds(stats.m_last_tx_time));
|
||||||
|
@ -235,8 +238,6 @@ static RPCHelpMan getpeerinfo()
|
||||||
heights.push_back(height);
|
heights.push_back(height);
|
||||||
}
|
}
|
||||||
obj.pushKV("inflight", heights);
|
obj.pushKV("inflight", heights);
|
||||||
obj.pushKV("relaytxes", statestats.m_relay_txs);
|
|
||||||
obj.pushKV("minfeefilter", ValueFromAmount(statestats.m_fee_filter_received));
|
|
||||||
obj.pushKV("addr_relay_enabled", statestats.m_addr_relay_enabled);
|
obj.pushKV("addr_relay_enabled", statestats.m_addr_relay_enabled);
|
||||||
obj.pushKV("addr_processed", statestats.m_addr_processed);
|
obj.pushKV("addr_processed", statestats.m_addr_processed);
|
||||||
obj.pushKV("addr_rate_limited", statestats.m_addr_rate_limited);
|
obj.pushKV("addr_rate_limited", statestats.m_addr_rate_limited);
|
||||||
|
@ -246,6 +247,9 @@ static RPCHelpMan getpeerinfo()
|
||||||
permissions.push_back(permission);
|
permissions.push_back(permission);
|
||||||
}
|
}
|
||||||
obj.pushKV("permissions", permissions);
|
obj.pushKV("permissions", permissions);
|
||||||
|
if (fStateStats) {
|
||||||
|
obj.pushKV("minfeefilter", ValueFromAmount(statestats.m_fee_filter_received));
|
||||||
|
}
|
||||||
|
|
||||||
UniValue sendPerMsgType(UniValue::VOBJ);
|
UniValue sendPerMsgType(UniValue::VOBJ);
|
||||||
for (const auto& i : stats.mapSendBytesPerMsgType) {
|
for (const auto& i : stats.mapSendBytesPerMsgType) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue