Skip to content

Commit

Permalink
chainstate: Check scrypt block hash in ReadBlockFromDisk()
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Feb 3, 2024
1 parent f5f35ec commit 186a62f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/blockstorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand Down

0 comments on commit 186a62f

Please sign in to comment.