mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
Use common SetDataDir method to create temp directory in tests.
This commit is contained in:
@@ -130,6 +130,8 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
|
||||
|
||||
LOCK(cs_main);
|
||||
|
||||
std::string backup_file = (SetDataDir("importwallet_rescan") / "wallet.backup").string();
|
||||
|
||||
// Import key into wallet and call dumpwallet to create backup file.
|
||||
{
|
||||
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>("dummy", WalletDatabase::CreateDummy());
|
||||
@@ -139,7 +141,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
|
||||
|
||||
JSONRPCRequest request;
|
||||
request.params.setArray();
|
||||
request.params.push_back((pathTemp / "wallet.backup").string());
|
||||
request.params.push_back(backup_file);
|
||||
AddWallet(wallet);
|
||||
::dumpwallet(request);
|
||||
RemoveWallet(wallet);
|
||||
@@ -152,7 +154,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
|
||||
|
||||
JSONRPCRequest request;
|
||||
request.params.setArray();
|
||||
request.params.push_back((pathTemp / "wallet.backup").string());
|
||||
request.params.push_back(backup_file);
|
||||
AddWallet(wallet);
|
||||
::importwallet(request);
|
||||
RemoveWallet(wallet);
|
||||
|
||||
Reference in New Issue
Block a user