aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/test/util.cpp')
-rw-r--r--src/wallet/test/util.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wallet/test/util.cpp b/src/wallet/test/util.cpp
index b21a9a601d..43fd91fe60 100644
--- a/src/wallet/test/util.cpp
+++ b/src/wallet/test/util.cpp
@@ -31,8 +31,9 @@ std::unique_ptr<CWallet> CreateSyncedWallet(interfaces::Chain& chain, CChain& cc
FlatSigningProvider provider;
std::string error;
- std::unique_ptr<Descriptor> desc = Parse("combo(" + EncodeSecret(key) + ")", provider, error, /* require_checksum=*/ false);
- assert(desc);
+ auto descs = Parse("combo(" + EncodeSecret(key) + ")", provider, error, /* require_checksum=*/ false);
+ assert(descs.size() == 1);
+ auto& desc = descs.at(0);
WalletDescriptor w_desc(std::move(desc), 0, 0, 1, 1);
if (!wallet->AddWalletDescriptor(w_desc, provider, "", false)) assert(false);
}
@@ -74,7 +75,7 @@ void TestUnloadWallet(std::shared_ptr<CWallet>&& wallet)
// Calls SyncWithValidationInterfaceQueue
wallet->chain().waitForNotificationsIfTipChanged({});
wallet->m_chain_notifications_handler.reset();
- UnloadWallet(std::move(wallet));
+ WaitForDeleteWallet(std::move(wallet));
}
std::unique_ptr<WalletDatabase> DuplicateMockDatabase(WalletDatabase& database)