@@ -433,8 +433,8 @@ class NetinfoRequestHandler : public BaseRequestHandler
433433 bool is_addr_relay_enabled;
434434 bool is_bip152_hb_from;
435435 bool is_bip152_hb_to;
436- bool is_block_relay;
437436 bool is_outbound;
437+ bool is_tx_relay;
438438 bool operator <(const Peer& rhs) const { return std::tie (is_outbound, min_ping) < std::tie (rhs.is_outbound , rhs.min_ping ); }
439439 };
440440 std::vector<Peer> m_peers;
@@ -498,13 +498,13 @@ class NetinfoRequestHandler : public BaseRequestHandler
498498 const int8_t network_id{NetworkStringToId (network)};
499499 if (network_id == UNKNOWN_NETWORK) continue ;
500500 const bool is_outbound{!peer[" inbound" ].get_bool ()};
501- const bool is_block_relay {peer[" relaytxes" ].isNull () ? false : ! peer[" relaytxes" ].get_bool ()};
501+ const bool is_tx_relay {peer[" relaytxes" ].isNull () ? true : peer[" relaytxes" ].get_bool ()};
502502 const std::string conn_type{peer[" connection_type" ].get_str ()};
503503 ++m_counts.at (is_outbound).at (network_id); // in/out by network
504504 ++m_counts.at (is_outbound).at (NETWORKS.size ()); // in/out overall
505505 ++m_counts.at (2 ).at (network_id); // total by network
506506 ++m_counts.at (2 ).at (NETWORKS.size ()); // total overall
507- if (is_block_relay ) ++m_block_relay_peers_count;
507+ if (conn_type == " block-relay-only " ) ++m_block_relay_peers_count;
508508 if (conn_type == " manual" ) ++m_manual_peers_count;
509509 if (DetailsRequested ()) {
510510 // Push data for this peer to the peers vector.
@@ -527,7 +527,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
527527 const bool is_addr_relay_enabled{peer[" addr_relay_enabled" ].isNull () ? false : peer[" addr_relay_enabled" ].get_bool ()};
528528 const bool is_bip152_hb_from{peer[" bip152_hb_from" ].get_bool ()};
529529 const bool is_bip152_hb_to{peer[" bip152_hb_to" ].get_bool ()};
530- m_peers.push_back ({addr, sub_version, conn_type, NETWORK_SHORT_NAMES[network_id], age, transport, min_ping, ping, addr_processed, addr_rate_limited, last_blck, last_recv, last_send, last_trxn, peer_id, mapped_as, version, is_addr_relay_enabled, is_bip152_hb_from, is_bip152_hb_to, is_block_relay, is_outbound });
530+ m_peers.push_back ({addr, sub_version, conn_type, NETWORK_SHORT_NAMES[network_id], age, transport, min_ping, ping, addr_processed, addr_rate_limited, last_blck, last_recv, last_send, last_trxn, peer_id, mapped_as, version, is_addr_relay_enabled, is_bip152_hb_from, is_bip152_hb_to, is_outbound, is_tx_relay });
531531 m_max_addr_length = std::max (addr.length () + 1 , m_max_addr_length);
532532 m_max_addr_processed_length = std::max (ToString (addr_processed).length (), m_max_addr_processed_length);
533533 m_max_addr_rate_limited_length = std::max (ToString (addr_rate_limited).length (), m_max_addr_rate_limited_length);
@@ -561,7 +561,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
561561 PingTimeToString (peer.ping ),
562562 peer.last_send ? ToString (time_now - peer.last_send ) : " " ,
563563 peer.last_recv ? ToString (time_now - peer.last_recv ) : " " ,
564- peer.last_trxn ? ToString ((time_now - peer.last_trxn ) / 60 ) : peer.is_block_relay ? " * " : " " ,
564+ peer.last_trxn ? ToString ((time_now - peer.last_trxn ) / 60 ) : peer.is_tx_relay ? " " : " * " ,
565565 peer.last_blck ? ToString ((time_now - peer.last_blck ) / 60 ) : " " ,
566566 strprintf (" %s%s" , peer.is_bip152_hb_to ? " ." : " " , peer.is_bip152_hb_from ? " *" : " " ),
567567 m_max_addr_processed_length, // variable spacing
0 commit comments