diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 8657340cb6cfb5..58f7c257e89e31 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -487,7 +487,7 @@ class NetinfoRequestHandler : public BaseRequestHandler if (network_id == UNKNOWN_NETWORK) continue; m_is_i2p_on |= (network_id == NET_I2P); const bool is_outbound{!peer["inbound"].get_bool()}; - const bool is_block_relay{!peer["relaytxes"].get_bool()}; + const bool is_block_relay{peer["relaytxes"].isNull() ? false : !peer["relaytxes"].get_bool()}; const std::string conn_type{peer["connection_type"].get_str()}; ++m_counts.at(is_outbound).at(network_id); // in/out by network ++m_counts.at(is_outbound).at(m_networks_size); // in/out overall