diff --git a/src/test/peerman_tests.cpp b/src/test/peerman_tests.cpp index 2c79329385..7ab41b8684 100644 --- a/src/test/peerman_tests.cpp +++ b/src/test/peerman_tests.cpp @@ -21,6 +21,7 @@ static void mineBlock(const node::NodeContext& node, std::chrono::seconds block_ auto curr_time = GetTime(); 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