mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Add ChainClient setMockTime, getWallets methods
Needed to set mock times, and get wallet interface pointers correctly when wallet code is running in a different process from node code.
This commit is contained in:
@@ -251,8 +251,9 @@ public:
|
||||
std::vector<std::unique_ptr<Wallet>> getWallets() override
|
||||
{
|
||||
std::vector<std::unique_ptr<Wallet>> wallets;
|
||||
for (const std::shared_ptr<CWallet>& wallet : GetWallets()) {
|
||||
wallets.emplace_back(MakeWallet(wallet));
|
||||
for (auto& client : m_context.chain_clients) {
|
||||
auto client_wallets = client->getWallets();
|
||||
std::move(client_wallets.begin(), client_wallets.end(), std::back_inserter(wallets));
|
||||
}
|
||||
return wallets;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user