aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/wallet.cpp')
-rw-r--r--src/interfaces/wallet.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index 14c6bd0330..e9f4669f4d 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -7,6 +7,7 @@
#include <amount.h>
#include <chain.h>
#include <consensus/validation.h>
+#include <interfaces/chain.h>
#include <interfaces/handler.h>
#include <net.h>
#include <policy/feerate.h>
@@ -20,11 +21,17 @@
#include <timedata.h>
#include <ui_interface.h>
#include <uint256.h>
+#include <util/system.h>
#include <validation.h>
#include <wallet/feebumper.h>
#include <wallet/fees.h>
#include <wallet/wallet.h>
+#include <memory>
+#include <string>
+#include <utility>
+#include <vector>
+
namespace interfaces {
namespace {
@@ -456,8 +463,25 @@ public:
CWallet& m_wallet;
};
+class WalletClientImpl : public ChainClient
+{
+public:
+ WalletClientImpl(Chain& chain, std::vector<std::string> wallet_filenames)
+ : m_chain(chain), m_wallet_filenames(std::move(wallet_filenames))
+ {
+ }
+
+ Chain& m_chain;
+ std::vector<std::string> m_wallet_filenames;
+};
+
} // namespace
std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet) { return MakeUnique<WalletImpl>(wallet); }
+std::unique_ptr<ChainClient> MakeWalletClient(Chain& chain, std::vector<std::string> wallet_filenames)
+{
+ return MakeUnique<WalletClientImpl>(chain, std::move(wallet_filenames));
+}
+
} // namespace interfaces