@@ -299,8 +299,8 @@ class NetinfoRequestHandler : public BaseRequestHandler
299
299
{
300
300
private:
301
301
static constexpr int8_t UNKNOWN_NETWORK{-1 };
302
- static constexpr uint8_t m_networks_size{3 };
303
- const std::array<std::string, m_networks_size> m_networks{{" ipv4" , " ipv6" , " onion" }};
302
+ static constexpr uint8_t m_networks_size{4 };
303
+ const std::array<std::string, m_networks_size> m_networks{{" ipv4" , " ipv6" , " onion" , " i2p " }};
304
304
std::array<std::array<uint16_t , m_networks_size + 2 >, 3 > m_counts{{{}}}; // !< Peer counts by (in/out/total, networks/total/block-relay)
305
305
int8_t NetworkStringToId (const std::string& str) const
306
306
{
@@ -454,10 +454,10 @@ class NetinfoRequestHandler : public BaseRequestHandler
454
454
}
455
455
456
456
// Report peer connection totals by type.
457
- result += " ipv4 ipv6 onion total block-relay\n " ;
457
+ result += " ipv4 ipv6 onion i2p total block-relay\n " ;
458
458
const std::array<std::string, 3 > rows{{" in" , " out" , " total" }};
459
- for (uint8_t i = 0 ; i < m_networks_size ; ++i) {
460
- result += strprintf (" %-5s %5i %5i %5i %5i %5i\n " , rows.at (i), m_counts.at (i).at (0 ), m_counts.at (i).at (1 ), m_counts.at (i).at (2 ), m_counts.at (i).at (m_networks_size), m_counts.at (i).at (m_networks_size + 1 ));
459
+ for (uint8_t i = 0 ; i < 3 ; ++i) {
460
+ result += strprintf (" %-5s %5i %5i %5i %5i %5i %5i \n " , rows.at (i), m_counts.at (i).at (0 ), m_counts.at (i).at (1 ), m_counts.at (i).at (2 ), m_counts. at (i). at ( 3 ), m_counts.at (i).at (m_networks_size), m_counts.at (i).at (m_networks_size + 1 ));
461
461
}
462
462
463
463
// Report local addresses, ports, and scores.
0 commit comments