Skip to content

Commit

Permalink
Fix unit test peerman_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timemarkovqtum committed Aug 30, 2024
1 parent 68e6387 commit 7466a0f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/test/peerman_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ static void mineBlock(const node::NodeContext& node, std::chrono::seconds block_
auto curr_time = GetTime<std::chrono::seconds>();
SetMockTime(block_time); // update time so the block is created with it
CBlock block = node::BlockAssembler{node.chainman->ActiveChainstate(), nullptr}.CreateNewBlock(CScript() << OP_TRUE)->block;
node::RegenerateCommitments(block, *Assert(node.chainman)); // Update block.hashMerkleRoot
while (!CheckProofOfWork(block.GetHash(), block.nBits, node.chainman->GetConsensus())) ++block.nNonce;
block.fChecked = true; // little speedup
SetMockTime(curr_time); // process block at current time
Expand Down

0 comments on commit 7466a0f

Please sign in to comment.