diff options
author | Anthony Towns <aj@erisian.com.au> | 2022-04-15 07:47:20 +1000 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-04-26 18:43:37 -0400 |
commit | 6e747e80e7094df0b5bee1eed57e57e82015d0ee (patch) | |
tree | bb83c5afffd9918735d3994f8f5baca207d812d8 /src/test/validation_chainstatemanager_tests.cpp | |
parent | 98f4bdae81804de17f125bd7c2cd8a48e850a6d2 (diff) | |
download | bitcoin-6e747e80e7094df0b5bee1eed57e57e82015d0ee.tar.xz |
validation: default initialize and guard chainman members
Diffstat (limited to 'src/test/validation_chainstatemanager_tests.cpp')
-rw-r--r-- | src/test/validation_chainstatemanager_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/validation_chainstatemanager_tests.cpp b/src/test/validation_chainstatemanager_tests.cpp index 5d0ec593e3..6dc522b421 100644 --- a/src/test/validation_chainstatemanager_tests.cpp +++ b/src/test/validation_chainstatemanager_tests.cpp @@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(chainstatemanager) WITH_LOCK(::cs_main, c1.InitCoinsCache(1 << 23)); BOOST_CHECK(!manager.IsSnapshotActive()); - BOOST_CHECK(!manager.IsSnapshotValidated()); + BOOST_CHECK(WITH_LOCK(::cs_main, return !manager.IsSnapshotValidated())); auto all = manager.GetAll(); BOOST_CHECK_EQUAL_COLLECTIONS(all.begin(), all.end(), chainstates.begin(), chainstates.end()); @@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(chainstatemanager) BOOST_CHECK(c2.ActivateBestChain(_, nullptr)); BOOST_CHECK(manager.IsSnapshotActive()); - BOOST_CHECK(!manager.IsSnapshotValidated()); + BOOST_CHECK(WITH_LOCK(::cs_main, return !manager.IsSnapshotValidated())); BOOST_CHECK_EQUAL(&c2, &manager.ActiveChainstate()); BOOST_CHECK(&c1 != &manager.ActiveChainstate()); auto all2 = manager.GetAll(); |