diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2020-04-30 11:21:33 -0700 |
---|---|---|
committer | Amiti Uttarwar <amiti@uttarwar.org> | 2020-08-07 17:18:16 -0700 |
commit | d3698b5ee309cf0f0cdfb286d6b30a256d7deae5 (patch) | |
tree | 2ec1c0ac6f890d583c9e16331e81361470ed249b | |
parent | 46578c03e92a55925308363ccdad04dcfc820d96 (diff) |
[net/refactor] Add connection type as a member var to CNode
- Directly maintaining the connection type prevents having to deduce it from
several flags.
-rw-r--r-- | src/net.cpp | 1 | ||||
-rw-r--r-- | src/net.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index a43d02bbd9..42748dfc86 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2749,6 +2749,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn // traffic). id(idIn), nLocalHostNonce(nLocalHostNonceIn), + m_conn_type(conn_type_in), nLocalServices(nLocalServicesIn), nMyStartingHeight(nMyStartingHeightIn) { @@ -875,6 +875,7 @@ public: private: const NodeId id; const uint64_t nLocalHostNonce; + const ConnectionType m_conn_type; //! Services offered to this peer. //! |