aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-11-27 10:39:18 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-11-27 10:40:54 +0100
commite1169d7eea12e727cfffa755398fc964e48cbd10 (patch)
treecfe37cdf2c324f412426ca57f9e9d2b343cf2d0e /src/net.h
parent2fc12794c267e9666179e2c96d9a7b56801a11cf (diff)
parenta946aa8d3ec7009ac670eeb65a525efe5eeb6e84 (diff)
Merge pull request #3296
a946aa8 Store and use a sanitized subVer (Mike Hearn) ba6a4ea Add some additional logging to give extra network insight. (Mike Hearn)
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net.h b/src/net.h
index 278462a0bc..effce35dc4 100644
--- a/src/net.h
+++ b/src/net.h
@@ -121,7 +121,7 @@ public:
int64_t nTimeConnected;
std::string addrName;
int nVersion;
- std::string strSubVer;
+ std::string cleanSubVer;
bool fInbound;
int nStartingHeight;
int nMisbehavior;
@@ -203,7 +203,11 @@ public:
std::string addrName;
CService addrLocal;
int nVersion;
- std::string strSubVer;
+ // strSubVer is whatever byte array we read from the wire. However, this field is intended
+ // to be printed out, displayed to humans in various forms and so on. So we sanitize it and
+ // store the sanitized version in cleanSubVer. The original should be used when dealing with
+ // the network or wire types and the cleaned string used when displayed or logged.
+ std::string strSubVer, cleanSubVer;
bool fOneShot;
bool fClient;
bool fInbound;