diff options
| author | Russell Yanofsky <[email protected]> | 2017-12-05 15:57:12 -0500 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2020-02-25 05:50:39 -0500 |
| commit | 1dde238f2c21a0cc9bada10a2449cf9c6b2178ad (patch) | |
| tree | 26269cc1ac164d0ef0ebc442b334ad58fe7a2119 /src/interfaces/node.cpp | |
| parent | Merge #17264: rpc: set default bip32derivs to true for psbt methods (diff) | |
| download | discoin-1dde238f2c21a0cc9bada10a2449cf9c6b2178ad.tar.xz discoin-1dde238f2c21a0cc9bada10a2449cf9c6b2178ad.zip | |
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.
Diffstat (limited to 'src/interfaces/node.cpp')
| -rw-r--r-- | src/interfaces/node.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp index 8a64a9d26..c3cfc7131 100644 --- a/src/interfaces/node.cpp +++ b/src/interfaces/node.cpp @@ -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; } |