From be98dc38942f302c6ca5982862bef8a510053c06 Mon Sep 17 00:00:00 2001 From: Pasta Date: Fri, 27 Dec 2019 17:45:49 -0600 Subject: [PATCH] test_dash continued Signed-off-by: Pasta --- src/test/test_dash.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/test_dash.cpp b/src/test/test_dash.cpp index c494bcb3e3..f5b6ea2924 100644 --- a/src/test/test_dash.cpp +++ b/src/test/test_dash.cpp @@ -204,7 +204,10 @@ CBlock TestChainSetup::CreateBlock(const std::vector& txns, // IncrementExtraNonce creates a valid coinbase and merkleRoot unsigned int extraNonce = 0; - IncrementExtraNonce(&block, chainActive.Tip(), extraNonce); + { + LOCK(cs_main); + IncrementExtraNonce(&block, chainActive.Tip(), extraNonce); + } while (!CheckProofOfWork(block.GetHash(), block.nBits, chainparams.GetConsensus())) ++block.nNonce;