diff --git a/libp2p/NodeTable.h b/libp2p/NodeTable.h index 04e8d009c..0217c700e 100644 --- a/libp2p/NodeTable.h +++ b/libp2p/NodeTable.h @@ -163,7 +163,7 @@ public: std::list snapshot() const; /// Returns true if node id is in node table. - bool haveNode(NodeId const& _id) { Guard l(x_nodes); return m_nodes.count(_id); } + bool haveNode(NodeId const& _id) { Guard l(x_nodes); return m_nodes.count(_id) > 0; } /// Returns the Node to the corresponding node id or the empty Node if that id is not found. Node node(NodeId const& _id); @@ -418,4 +418,4 @@ struct NodeTableEgress: public LogChannel { static const char* name() { return " struct NodeTableIngress: public LogChannel { static const char* name() { return "<