diff options
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/wallet.cpp | 8 | ||||
| -rw-r--r-- | src/interfaces/wallet.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index f68016b55..4124bc786 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -7,6 +7,7 @@ #include <amount.h> #include <interfaces/chain.h> #include <interfaces/handler.h> +#include <node/context.h> #include <policy/fees.h> #include <primitives/transaction.h> #include <rpc/server.h> @@ -489,8 +490,9 @@ public: class WalletClientImpl : public WalletClient { public: - WalletClientImpl(Chain& chain, ArgsManager& args) + WalletClientImpl(NodeContext& node, Chain& chain, ArgsManager& args) { + m_context.nodeContext = &node; m_context.chain = &chain; m_context.args = &args; } @@ -566,9 +568,9 @@ public: std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet) { return wallet ? MakeUnique<WalletImpl>(wallet) : nullptr; } -std::unique_ptr<WalletClient> MakeWalletClient(Chain& chain, ArgsManager& args) +std::unique_ptr<WalletClient> MakeWalletClient(NodeContext& node, ArgsManager& args) { - return MakeUnique<WalletClientImpl>(chain, args); + return MakeUnique<WalletClientImpl>(node, *node.chain, args); } } // namespace interfaces diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h index 6ccfd7fc2..5f93b8264 100644 --- a/src/interfaces/wallet.h +++ b/src/interfaces/wallet.h @@ -411,7 +411,7 @@ std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet); //! Return implementation of ChainClient interface for a wallet client. This //! function will be undefined in builds where ENABLE_WALLET is false. -std::unique_ptr<WalletClient> MakeWalletClient(Chain& chain, ArgsManager& args); +std::unique_ptr<WalletClient> MakeWalletClient(NodeContext& node, ArgsManager& args); } // namespace interfaces |