mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Hash P2P messages as they are received instead of at process-time
This commit is contained in:
parent
d2143dc937
commit
fe1dc62cef
3 changed files with 15 additions and 1 deletions
|
|
@ -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__,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue