diff options
| author | Matt Corallo <[email protected]> | 2016-10-30 18:02:16 -0400 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2016-10-30 18:04:57 -0400 |
| commit | fe1dc62cef88280d2490a619beded052f313c6fc (patch) | |
| tree | 508e9da109124c6bfc539451add560c2ef14ebb4 /src/main.cpp | |
| parent | Merge #8989: [Qt] overhaul smart-fee slider, adjust default confirmation target (diff) | |
| download | discoin-fe1dc62cef88280d2490a619beded052f313c6fc.tar.xz discoin-fe1dc62cef88280d2490a619beded052f313c6fc.zip | |
Hash P2P messages as they are received instead of at process-time
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5e17ec625..56c24d93b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6350,7 +6350,7 @@ bool ProcessMessages(CNode* pfrom, CConnman& connman) // Checksum CDataStream& vRecv = msg.vRecv; - uint256 hash = Hash(vRecv.begin(), vRecv.begin() + nMessageSize); + const uint256& hash = msg.GetMessageHash(); if (memcmp(hash.begin(), hdr.pchChecksum, CMessageHeader::CHECKSUM_SIZE) != 0) { LogPrintf("%s(%s, %u bytes): CHECKSUM ERROR expected %s was %s\n", __func__, |