mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02: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:
parent
31c0006a6c
commit
1dde238f2c
4 changed files with 26 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue