0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-06 14:19:59 -05:00

Bugfix: bitcoin-cli: Check length of peer.transport_protocol_type

This commit is contained in:
Luke Dashjr 2024-03-14 23:27:22 +00:00
parent 3d255dfb67
commit c3e632b441

View file

@ -551,7 +551,7 @@ public:
peer.is_outbound ? "out" : "in",
ConnectionTypeForNetinfo(peer.conn_type),
peer.network,
peer.transport_protocol_type.starts_with('v') ? peer.transport_protocol_type[1] : ' ',
(peer.transport_protocol_type.size() == 2 && peer.transport_protocol_type[0] == 'v') ? peer.transport_protocol_type[1] : ' ',
PingTimeToString(peer.min_ping),
PingTimeToString(peer.ping),
peer.last_send ? ToString(time_now - peer.last_send) : "",