From fe1dc62cef88280d2490a619beded052f313c6fc Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 30 Oct 2016 18:02:16 -0400 Subject: Hash P2P messages as they are received instead of at process-time --- src/net.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index 58b492e592..955bad488a 100644 --- a/src/net.h +++ b/src/net.h @@ -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); -- cgit v1.2.3