aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPavol Rusnak <stick@gk2.sk>2015-07-31 18:05:42 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-08-05 09:38:20 +0200
commit7b79cbd722d35b8113d5136b06d4a8e5fd569fc6 (patch)
tree484ed735e5644daf574fbf4bc2dedfe035a29373 /src/net.h
parent557f8eac7aa96059270a36358642fbce93ac0478 (diff)
downloadbitcoin-7b79cbd722d35b8113d5136b06d4a8e5fd569fc6.tar.xz
limit total length of user agent comments
Reworked-By: Wladimir J. van der Laan <laanwj@gmail.com>
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 658f586b12..62f84bbe45 100644
--- a/src/net.h
+++ b/src/net.h
@@ -46,6 +46,8 @@ static const unsigned int MAX_INV_SZ = 50000;
static const unsigned int MAX_ADDR_TO_SEND = 1000;
/** Maximum length of incoming protocol messages (no message over 2 MiB is currently acceptable). */
static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 2 * 1024 * 1024;
+/** Maximum length of strSubVer in `version` message */
+static const unsigned int MAX_SUBVERSION_LENGTH = 256;
/** -listen default */
static const bool DEFAULT_LISTEN = true;
/** -upnp default */
@@ -166,6 +168,9 @@ extern CCriticalSection cs_vAddedNodes;
extern NodeId nLastNodeId;
extern CCriticalSection cs_nLastNodeId;
+/** Subversion as sent to the P2P network in `version` messages */
+extern std::string strSubVersion;
+
struct LocalServiceInfo {
int nScore;
int nPort;