Skip to content

Commit

Permalink
Bugfix: bitcoin-cli: Check length of peer.transport_protocol_type
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed Mar 14, 2024
1 parent ed96a61 commit 7e94227
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
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) : "",
Expand Down

0 comments on commit 7e94227

Please sign in to comment.