net: remove CNode::m_inbound_onion defaults for explicitness

and to allow the compiler to warn if uninitialized in the ctor
or omitted in the caller.
This commit is contained in:
Jon Atack
2021-02-12 21:40:19 +01:00
parent 24bda56c29
commit 2ee4a7a9ec
4 changed files with 11 additions and 10 deletions

View File

@@ -430,7 +430,7 @@ public:
// Bind address of our side of the connection
const CAddress addrBind;
//! Whether this peer is an inbound onion, i.e. connected via our Tor onion service.
const bool m_inbound_onion{false};
const bool m_inbound_onion;
std::atomic<int> nVersion{0};
RecursiveMutex cs_SubVer;
/**
@@ -603,7 +603,7 @@ public:
// Whether a ping is requested.
std::atomic<bool> fPingQueued{false};
CNode(NodeId id, ServiceFlags nLocalServicesIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress& addrBindIn, const std::string& addrNameIn, ConnectionType conn_type_in, bool inbound_onion = false);
CNode(NodeId id, ServiceFlags nLocalServicesIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress& addrBindIn, const std::string& addrNameIn, ConnectionType conn_type_in, bool inbound_onion);
~CNode();
CNode(const CNode&) = delete;
CNode& operator=(const CNode&) = delete;