diff options
author | Matt Corallo <git@bluematt.me> | 2016-10-30 18:02:16 -0400 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2016-10-30 18:04:57 -0400 |
commit | fe1dc62cef88280d2490a619beded052f313c6fc (patch) | |
tree | 508e9da109124c6bfc539451add560c2ef14ebb4 /src/net.h | |
parent | d2143dc937e3fc93fd35def25a9c0461f26ccd4f (diff) |
Hash P2P messages as they are received instead of at process-time
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -512,6 +512,9 @@ public: class CNetMessage { +private: + mutable CHash256 hasher; + mutable uint256 data_hash; public: bool in_data; // parsing header (false) or data (true) @@ -539,6 +542,8 @@ public: return (hdr.nMessageSize == nDataPos); } + const uint256& GetMessageHash() const; + void SetVersion(int nVersionIn) { hdrbuf.SetVersion(nVersionIn); |