@@ -299,8 +299,8 @@ class NetinfoRequestHandler : public BaseRequestHandler
299299{
300300private:
301301 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 " }};
304304 std::array<std::array<uint16_t , m_networks_size + 2 >, 3 > m_counts{{{}}}; // !< Peer counts by (in/out/total, networks/total/block-relay)
305305 int8_t NetworkStringToId (const std::string& str) const
306306 {
@@ -454,10 +454,10 @@ class NetinfoRequestHandler : public BaseRequestHandler
454454 }
455455
456456 // 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 " ;
458458 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 ));
461461 }
462462
463463 // Report local addresses, ports, and scores.
0 commit comments