Skip to content

Commit 629a929

Browse files
committed
Move WalletImpl from interfaces/wallet.cpp to wallet/interfaces.cpp
1 parent 2a26771 commit 629a929

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,13 @@ endif
358358
libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(SQLITE_CFLAGS)
359359
libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
360360
libbitcoin_wallet_a_SOURCES = \
361-
interfaces/wallet.cpp \
362361
wallet/coincontrol.cpp \
363362
wallet/context.cpp \
364363
wallet/crypter.cpp \
365364
wallet/db.cpp \
366365
wallet/feebumper.cpp \
367366
wallet/fees.cpp \
367+
wallet/interfaces.cpp \
368368
wallet/load.cpp \
369369
wallet/rpcdump.cpp \
370370
wallet/rpcwallet.cpp \
Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,22 @@
3131
#include <utility>
3232
#include <vector>
3333

34-
namespace interfaces {
35-
namespace {
34+
using interfaces::Chain;
35+
using interfaces::FoundBlock;
36+
using interfaces::Handler;
37+
using interfaces::MakeHandler;
38+
using interfaces::Wallet;
39+
using interfaces::WalletAddress;
40+
using interfaces::WalletBalances;
41+
using interfaces::WalletClient;
42+
using interfaces::WalletOrderForm;
43+
using interfaces::WalletTx;
44+
using interfaces::WalletTxOut;
45+
using interfaces::WalletTxStatus;
46+
using interfaces::WalletValueMap;
3647

48+
namespace wallet {
49+
namespace {
3750
//! Construct wallet tx struct.
3851
WalletTx MakeWalletTx(CWallet& wallet, const CWalletTx& wtx)
3952
{
@@ -561,14 +574,14 @@ class WalletClientImpl : public WalletClient
561574
std::vector<std::unique_ptr<Handler>> m_rpc_handlers;
562575
std::list<CRPCCommand> m_rpc_commands;
563576
};
564-
565577
} // namespace
578+
} // namespace wallet
566579

567-
std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet) { return wallet ? MakeUnique<WalletImpl>(wallet) : nullptr; }
580+
namespace interfaces {
581+
std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet) { return wallet ? MakeUnique<wallet::WalletImpl>(wallet) : nullptr; }
568582

569583
std::unique_ptr<WalletClient> MakeWalletClient(Chain& chain, ArgsManager& args)
570584
{
571-
return MakeUnique<WalletClientImpl>(chain, args);
585+
return MakeUnique<wallet::WalletClientImpl>(chain, args);
572586
}
573-
574587
} // namespace interfaces

0 commit comments

Comments
 (0)