aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2022-08-16 23:32:55 -0400
committerRyan Ofsky <ryan@ofsky.org>2023-02-10 04:39:11 -0400
commitc00fa1a7341d3f47f992e0beb043da655cbca777 (patch)
treec48ec5e4b9f5713e7e50c3bd4199586c8d96130e /src/test
parent2eaeded37f3a07c35eef38d9a80c1e5fbd4d41ee (diff)
refactor, txdb: Add CoinsViewOptions struct
Add CoinsViewOptions struct to remove ArgsManager uses from txdb. To reduce size of this commit, this moves references to gArgs variable out of txdb.cpp to calling code in validation.cpp. But these moves are temporary. The gArgs references in validation.cpp are moved out to calling code in init.cpp in later commits. This commit does not change behavior.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/coins_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp
index 55ecd41af1..eb33e0028e 100644
--- a/src/test/coins_tests.cpp
+++ b/src/test/coins_tests.cpp
@@ -278,7 +278,7 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
CCoinsViewTest base;
SimulationTest(&base, false);
- CCoinsViewDB db_base{"test", /*nCacheSize=*/1 << 23, /*fMemory=*/true, /*fWipe=*/false};
+ CCoinsViewDB db_base{{.path = "test", .cache_bytes = 1 << 23, .memory_only = true}, {}};
SimulationTest(&db_base, true);
}
@@ -1064,7 +1064,7 @@ void TestFlushBehavior(
BOOST_AUTO_TEST_CASE(ccoins_flush_behavior)
{
// Create two in-memory caches atop a leveldb view.
- CCoinsViewDB base{"test", /*nCacheSize=*/ 1 << 23, /*fMemory=*/ true, /*fWipe=*/ false};
+ CCoinsViewDB base{{.path = "test", .cache_bytes = 1 << 23, .memory_only = true}, {}};
std::vector<std::unique_ptr<CCoinsViewCacheTest>> caches;
caches.push_back(std::make_unique<CCoinsViewCacheTest>(&base));
caches.push_back(std::make_unique<CCoinsViewCacheTest>(caches.back().get()));