mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 20:32:35 -03:00
test: Make sure wallet.backup is created in temp path
This assures that we don't overwrite a random file called `wallet.backup` that happens to be in the current directory. It also assures that the temporary file will be cleaned up. Noticed by Evan Klitzke, came up in discussion here: https://github.com/bitcoin/bitcoin/pull/10880#discussion_r128460722
This commit is contained in:
parent
1caafa6cde
commit
88af227687
1 changed files with 2 additions and 2 deletions
|
@ -469,7 +469,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
|
|||
|
||||
JSONRPCRequest request;
|
||||
request.params.setArray();
|
||||
request.params.push_back("wallet.backup");
|
||||
request.params.push_back((pathTemp / "wallet.backup").string());
|
||||
vpwallets.insert(vpwallets.begin(), &wallet);
|
||||
::dumpwallet(request);
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
|
|||
|
||||
JSONRPCRequest request;
|
||||
request.params.setArray();
|
||||
request.params.push_back("wallet.backup");
|
||||
request.params.push_back((pathTemp / "wallet.backup").string());
|
||||
vpwallets[0] = &wallet;
|
||||
::importwallet(request);
|
||||
|
||||
|
|
Loading…
Reference in a new issue