From d70dc89e78ee6355e0bc37cc36cfc04ef7a86885 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Fri, 30 Oct 2020 16:41:23 -0400 Subject: refactor: Consolidate redundant wallet database path and exists functions No change in behavior. Just remove a little bit of code, reduce macro usage, remove duplicative functions, and make BDB and SQLite implementations more consistent with each other. --- src/wallet/test/db_tests.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/wallet/test') diff --git a/src/wallet/test/db_tests.cpp b/src/wallet/test/db_tests.cpp index 8f0083cd2e..1a28852a6b 100644 --- a/src/wallet/test/db_tests.cpp +++ b/src/wallet/test/db_tests.cpp @@ -13,6 +13,13 @@ BOOST_FIXTURE_TEST_SUITE(db_tests, BasicTestingSetup) +static std::shared_ptr GetWalletEnv(const fs::path& path, std::string& database_filename) +{ + fs::path data_file = BDBDataFile(path); + database_filename = data_file.filename().string(); + return GetBerkeleyEnv(data_file.parent_path()); +} + BOOST_AUTO_TEST_CASE(getwalletenv_file) { std::string test_name = "test_name.dat"; -- cgit v1.2.3