mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
test: Simplify cs_main locks
This commit is contained in:
parent
2f71a1ea35
commit
faec851b6e
2 changed files with 4 additions and 13 deletions
|
|
@ -34,9 +34,7 @@ BOOST_AUTO_TEST_CASE(validation_chainstate_resize_caches)
|
|||
return outp;
|
||||
};
|
||||
|
||||
ENTER_CRITICAL_SECTION(cs_main);
|
||||
CChainState& c1 = manager.InitializeChainstate();
|
||||
LEAVE_CRITICAL_SECTION(cs_main);
|
||||
CChainState& c1 = *WITH_LOCK(cs_main, return &manager.InitializeChainstate());
|
||||
c1.InitCoinsDB(
|
||||
/* cache_size_bytes */ 1 << 23, /* in_memory */ true, /* should_wipe */ false);
|
||||
WITH_LOCK(::cs_main, c1.InitCoinsCache(1 << 23));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue