diff options
| author | Russell Yanofsky <[email protected]> | 2020-05-28 02:13:19 -0400 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2020-05-28 02:13:19 -0400 |
| commit | e783197bf0f7429f80fea94b44c59857bc8cfef9 (patch) | |
| tree | fe3756424868d395910d5cb529ea490fb37a9299 /src/interfaces/wallet.cpp | |
| parent | Merge #16127: More thread safety annotation coverage (diff) | |
| download | discoin-e783197bf0f7429f80fea94b44c59857bc8cfef9.tar.xz discoin-e783197bf0f7429f80fea94b44c59857bc8cfef9.zip | |
refactor: replace RegisterWalletRPCCommands with GetWalletRPCCommands
Diffstat (limited to 'src/interfaces/wallet.cpp')
| -rw-r--r-- | src/interfaces/wallet.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index 349dce024..9e5b357f6 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -9,6 +9,7 @@ #include <interfaces/handler.h> #include <policy/fees.h> #include <primitives/transaction.h> +#include <rpc/server.h> #include <script/standard.h> #include <support/allocators/secure.h> #include <sync.h> @@ -487,7 +488,9 @@ public: void registerRpcs() override { g_rpc_chain = &m_chain; - return RegisterWalletRPCCommands(m_chain, m_rpc_handlers); + for (const CRPCCommand& command : GetWalletRPCCommands()) { + m_rpc_handlers.emplace_back(m_chain.handleRpc(command)); + } } bool verify() override { return VerifyWallets(m_chain, m_wallet_filenames); } bool load() override { return LoadWallets(m_chain, m_wallet_filenames); } |