diff options
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/test/db_tests.cpp | 12 | ||||
-rw-r--r-- | src/wallet/test/init_test_fixture.cpp | 2 | ||||
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 2 | ||||
-rw-r--r-- | src/wallet/walletutil.cpp | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/wallet/test/db_tests.cpp b/src/wallet/test/db_tests.cpp index b2eb8e4bca..17f5264b45 100644 --- a/src/wallet/test/db_tests.cpp +++ b/src/wallet/test/db_tests.cpp @@ -23,7 +23,7 @@ static std::shared_ptr<BerkeleyEnvironment> GetWalletEnv(const fs::path& path, s BOOST_AUTO_TEST_CASE(getwalletenv_file) { std::string test_name = "test_name.dat"; - const fs::path datadir = GetDataDir(); + const fs::path datadir = gArgs.GetDataDirNet(); fs::path file_path = datadir / test_name; std::ofstream f(file_path.BOOST_FILESYSTEM_C_STR); f.close(); @@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE(getwalletenv_file) BOOST_AUTO_TEST_CASE(getwalletenv_directory) { std::string expected_name = "wallet.dat"; - const fs::path datadir = GetDataDir(); + const fs::path datadir = gArgs.GetDataDirNet(); std::string filename; std::shared_ptr<BerkeleyEnvironment> env = GetWalletEnv(datadir, filename); @@ -47,8 +47,8 @@ BOOST_AUTO_TEST_CASE(getwalletenv_directory) BOOST_AUTO_TEST_CASE(getwalletenv_g_dbenvs_multiple) { - fs::path datadir = GetDataDir() / "1"; - fs::path datadir_2 = GetDataDir() / "2"; + fs::path datadir = gArgs.GetDataDirNet() / "1"; + fs::path datadir_2 = gArgs.GetDataDirNet() / "2"; std::string filename; std::shared_ptr<BerkeleyEnvironment> env_1 = GetWalletEnv(datadir, filename); @@ -61,8 +61,8 @@ BOOST_AUTO_TEST_CASE(getwalletenv_g_dbenvs_multiple) BOOST_AUTO_TEST_CASE(getwalletenv_g_dbenvs_free_instance) { - fs::path datadir = GetDataDir() / "1"; - fs::path datadir_2 = GetDataDir() / "2"; + fs::path datadir = gArgs.GetDataDirNet() / "1"; + fs::path datadir_2 = gArgs.GetDataDirNet() / "2"; std::string filename; std::shared_ptr <BerkeleyEnvironment> env_1_a = GetWalletEnv(datadir, filename); diff --git a/src/wallet/test/init_test_fixture.cpp b/src/wallet/test/init_test_fixture.cpp index f035a70a20..dd9354848d 100644 --- a/src/wallet/test/init_test_fixture.cpp +++ b/src/wallet/test/init_test_fixture.cpp @@ -16,7 +16,7 @@ InitWalletDirTestingSetup::InitWalletDirTestingSetup(const std::string& chainNam std::string sep; sep += fs::path::preferred_separator; - m_datadir = GetDataDir(); + m_datadir = gArgs.GetDataDirNet(); m_cwd = fs::current_path(); m_walletdir_path_cases["default"] = m_datadir / "wallets"; diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 512374c34f..34bb29f79f 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -253,7 +253,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup) SetMockTime(KEY_TIME); m_coinbase_txns.emplace_back(CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())).vtx[0]); - std::string backup_file = (GetDataDir() / "wallet.backup").string(); + std::string backup_file = (gArgs.GetDataDirNet() / "wallet.backup").string(); // Import key into wallet and call dumpwallet to create backup file. { diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp index dd2f071b6c..1c518daba6 100644 --- a/src/wallet/walletutil.cpp +++ b/src/wallet/walletutil.cpp @@ -19,7 +19,7 @@ fs::path GetWalletDir() path = ""; } } else { - path = GetDataDir(); + path = gArgs.GetDataDirNet(); // If a wallets directory exists, use that, otherwise default to GetDataDir if (fs::is_directory(path / "wallets")) { path /= "wallets"; |