diff options
author | Troy Giorshev <troygiorshev@gmail.com> | 2020-06-29 14:09:42 -0400 |
---|---|---|
committer | Troy Giorshev <troygiorshev@gmail.com> | 2020-09-22 22:01:14 -0400 |
commit | 2716647ebf60cea05fc9edce6a18dcce4e7727ad (patch) | |
tree | 95aeccb07b675773b935be187721b21d62219639 /src/net.h | |
parent | b1291b2e8fc39b366765d905200f022823e3d50b (diff) | |
download | bitcoin-2716647ebf60cea05fc9edce6a18dcce4e7727ad.tar.xz |
Give V1TransportDeserializer an m_node_id member
This is intended to only be used for logging.
This will allow log messages in the following commits to keep recording
the peer's ID, even when logging is moved into V1TransportDeserializer.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -739,6 +739,7 @@ public: class V1TransportDeserializer final : public TransportDeserializer { private: + const NodeId m_node_id; // Only for logging mutable CHash256 hasher; mutable uint256 data_hash; bool in_data; // parsing header (false) or data (true) @@ -764,8 +765,12 @@ private: } public: - - V1TransportDeserializer(const CMessageHeader::MessageStartChars& pchMessageStartIn, int nTypeIn, int nVersionIn) : hdrbuf(nTypeIn, nVersionIn), hdr(pchMessageStartIn), vRecv(nTypeIn, nVersionIn) { + V1TransportDeserializer(const CMessageHeader::MessageStartChars& pchMessageStartIn, const NodeId node_id, int nTypeIn, int nVersionIn) + : m_node_id(node_id), + hdrbuf(nTypeIn, nVersionIn), + hdr(pchMessageStartIn), + vRecv(nTypeIn, nVersionIn) + { Reset(); } |