0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05:00

[net/refactor] Add connection type as a member var to CNode

- Directly maintaining the connection type prevents having to deduce it from
  several flags.
This commit is contained in:
Amiti Uttarwar 2020-04-30 11:21:33 -07:00
parent 46578c03e9
commit d3698b5ee3
2 changed files with 2 additions and 0 deletions

View file

@ -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)
{

View file

@ -875,6 +875,7 @@ public:
private:
const NodeId id;
const uint64_t nLocalHostNonce;
const ConnectionType m_conn_type;
//! Services offered to this peer.
//!