refactor: Pass wallet database into CWallet::Create

No changes in behavior
This commit is contained in:
Russell Yanofsky
2020-08-04 20:45:28 -04:00
parent 3c815cfe54
commit 8b5e7297c0
8 changed files with 27 additions and 25 deletions

View File

@ -37,9 +37,12 @@ BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup)
static std::shared_ptr<CWallet> TestLoadWallet(interfaces::Chain& chain)
{
DatabaseOptions options;
DatabaseStatus status;
bilingual_str error;
std::vector<bilingual_str> warnings;
auto wallet = CWallet::CreateWalletFromFile(chain, "", error, warnings);
auto database = MakeWalletDatabase("", options, status, error);
auto wallet = CWallet::Create(chain, "", std::move(database), options.create_flags, error, warnings);
wallet->postInitProcess();
return wallet;
}