mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-10 10:52:31 -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:
parent
46578c03e9
commit
d3698b5ee3
2 changed files with 2 additions and 0 deletions
|
@ -2749,6 +2749,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
|
||||||
// traffic).
|
// traffic).
|
||||||
id(idIn),
|
id(idIn),
|
||||||
nLocalHostNonce(nLocalHostNonceIn),
|
nLocalHostNonce(nLocalHostNonceIn),
|
||||||
|
m_conn_type(conn_type_in),
|
||||||
nLocalServices(nLocalServicesIn),
|
nLocalServices(nLocalServicesIn),
|
||||||
nMyStartingHeight(nMyStartingHeightIn)
|
nMyStartingHeight(nMyStartingHeightIn)
|
||||||
{
|
{
|
||||||
|
|
|
@ -875,6 +875,7 @@ public:
|
||||||
private:
|
private:
|
||||||
const NodeId id;
|
const NodeId id;
|
||||||
const uint64_t nLocalHostNonce;
|
const uint64_t nLocalHostNonce;
|
||||||
|
const ConnectionType m_conn_type;
|
||||||
|
|
||||||
//! Services offered to this peer.
|
//! Services offered to this peer.
|
||||||
//!
|
//!
|
||||||
|
|
Loading…
Add table
Reference in a new issue