diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2014-10-27 20:24:31 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2015-02-25 18:44:49 -0500 |
commit | eec37136fd0f6ab80772380d8f047d98743f31f5 (patch) | |
tree | f2e22ac82464d1d37ec312c1b76ab98cb8a29525 /src/protocol.h | |
parent | 8b298ca7d7540acc19d1df79a5c2af7b5aca8cbe (diff) |
make CMessageHeader a dumb storage class
It shouldn't know or care about bitcoind's chain param selection
Diffstat (limited to 'src/protocol.h')
-rw-r--r-- | src/protocol.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/protocol.h b/src/protocol.h index f8394ce52f..e838c0d363 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -29,11 +29,13 @@ class CMessageHeader { public: - CMessageHeader(); - CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn); + typedef unsigned char MessageStartChars[MESSAGE_START_SIZE]; + + CMessageHeader(const MessageStartChars& pchMessageStartIn); + CMessageHeader(const MessageStartChars& pchMessageStartIn, const char* pszCommand, unsigned int nMessageSizeIn); std::string GetCommand() const; - bool IsValid() const; + bool IsValid(const MessageStartChars& messageStart) const; ADD_SERIALIZE_METHODS; |