mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Merge #9045: Hash P2P messages as they are received instead of at process-time
fe1dc62 Hash P2P messages as they are received instead of at process-time (Matt Corallo)
This commit is contained in:
@@ -543,6 +543,9 @@ public:
|
||||
|
||||
|
||||
class CNetMessage {
|
||||
private:
|
||||
mutable CHash256 hasher;
|
||||
mutable uint256 data_hash;
|
||||
public:
|
||||
bool in_data; // parsing header (false) or data (true)
|
||||
|
||||
@@ -570,6 +573,8 @@ public:
|
||||
return (hdr.nMessageSize == nDataPos);
|
||||
}
|
||||
|
||||
const uint256& GetMessageHash() const;
|
||||
|
||||
void SetVersion(int nVersionIn)
|
||||
{
|
||||
hdrbuf.SetVersion(nVersionIn);
|
||||
|
||||
Reference in New Issue
Block a user