From 186a62f7a4a2bf1fc4254ae1d0f2327bb7469e5c Mon Sep 17 00:00:00 2001 From: lateminer <9951982+lateminer@users.noreply.github.com> Date: Sat, 3 Feb 2024 15:26:33 +0100 Subject: [PATCH] chainstate: Check scrypt block hash in ReadBlockFromDisk() --- src/node/blockstorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index c8017f1a4d..5b5d03e913 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -843,7 +843,7 @@ bool BlockManager::ReadBlockFromDisk(CBlock& block, const FlatFilePos& pos) cons // Check headers for proof-of-work blocks if (block.GetHash() != GetConsensus().hashGenesisBlock && block.IsProofOfWork()) { - if (!CheckProofOfWork(block.GetHash(), block.nBits, GetConsensus())) { + if (!CheckProofOfWork(block.GetPoWHash(), block.nBits, GetConsensus())) { return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString()); } }