Skip to content

Commit

Permalink
Fix: ValidationBlockTests
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartArray committed Apr 5, 2021
1 parent 82414be commit 5b060a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/validation_block_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ std::shared_ptr<CBlock> Block(const uint256& prev_hash)
CScript pubKey;
pubKey << i++ << OP_TRUE;

auto ptemplate = BlockAssembler(Params()).CreateNewBlock(pubKey, false);
auto ptemplate = BlockAssembler(Params()).CreateNewBlock(pubKey, ALGO_SCRYPT, false);
auto pblock = std::make_shared<CBlock>(ptemplate->block);
pblock->hashPrevBlock = prev_hash;
pblock->nTime = ++time;
Expand All @@ -71,7 +71,7 @@ std::shared_ptr<CBlock> FinalizeBlock(std::shared_ptr<CBlock> pblock)
{
pblock->hashMerkleRoot = BlockMerkleRoot(*pblock);

while (!CheckProofOfWork(pblock->GetHash(), pblock->nBits, Params().GetConsensus())) {
while (!CheckProofOfWork(GetPoWAlgoHash(pblock->GetBlockHeader()), pblock->nBits, Params().GetConsensus())) {
++(pblock->nNonce);
}

Expand Down

0 comments on commit 5b060a1

Please sign in to comment.