aboutsummaryrefslogtreecommitdiff
path: root/src/bench/block_assemble.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bench/block_assemble.cpp')
-rw-r--r--src/bench/block_assemble.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bench/block_assemble.cpp b/src/bench/block_assemble.cpp
index 8133fd9d65..cd4543c012 100644
--- a/src/bench/block_assemble.cpp
+++ b/src/bench/block_assemble.cpp
@@ -73,10 +73,12 @@ static void AssembleBlock(benchmark::State& state)
boost::thread_group thread_group;
CScheduler scheduler;
{
+ LOCK(cs_main);
::pblocktree.reset(new CBlockTreeDB(1 << 20, true));
::pcoinsdbview.reset(new CCoinsViewDB(1 << 23, true));
::pcoinsTip.reset(new CCoinsViewCache(pcoinsdbview.get()));
-
+ }
+ {
const CChainParams& chainparams = Params();
thread_group.create_thread(std::bind(&CScheduler::serviceQueue, &scheduler));
GetMainSignals().RegisterBackgroundSignalScheduler(scheduler);