aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-01-09 11:10:12 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-01-10 12:00:46 +0200
commit3642b2ed34e6609e8de558b352516daadb12cac1 (patch)
tree2c6c2a7509778274630ba2dd3b72bfc2cb5671b3 /src/net.h
parentacebb79d3f45eb18f820ca5bbc1e16e80fac55f1 (diff)
refactor, net: Increase CNode data member encapsulation
All protected CNode data members could be private.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/net.h b/src/net.h
index 45edeb4884..4e9f584b95 100644
--- a/src/net.h
+++ b/src/net.h
@@ -528,11 +528,6 @@ public:
*/
Network ConnectedThroughNetwork() const;
-protected:
- mapMsgCmdSize mapSendBytesPerMsgCmd GUARDED_BY(cs_vSend);
- mapMsgCmdSize mapRecvBytesPerMsgCmd GUARDED_BY(cs_vRecv);
-
-public:
// We selected peer as (compact blocks) high-bandwidth peer (BIP152)
std::atomic<bool> m_bip152_highbandwidth_to{false};
// Peer selected us as (compact blocks) high-bandwidth peer (BIP152)
@@ -605,8 +600,6 @@ public:
CNode(const CNode&) = delete;
CNode& operator=(const CNode&) = delete;
-public:
-
NodeId GetId() const {
return id;
}
@@ -657,8 +650,6 @@ public:
nRefCount--;
}
-
-
void AddAddressKnown(const CAddress& _addr)
{
assert(m_addr_known);
@@ -690,7 +681,6 @@ public:
}
}
-
void AddKnownTx(const uint256& hash)
{
if (m_tx_relay != nullptr) {
@@ -760,6 +750,9 @@ private:
//! Whether this peer is an inbound onion, e.g. connected via our Tor onion service.
const bool m_inbound_onion{false};
+
+ mapMsgCmdSize mapSendBytesPerMsgCmd GUARDED_BY(cs_vSend);
+ mapMsgCmdSize mapRecvBytesPerMsgCmd GUARDED_BY(cs_vRecv);
};
/**