diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2020-11-24 10:20:16 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-11-24 10:20:16 -0500 |
commit | 629a9299b2a7241a3fa7d597cb34abcbe1af9255 (patch) | |
tree | f3d1e9436dab40f1d7eecbabde4f5d93d91e33cb | |
parent | 2a26771d8161d30be1853a35acfee588cce03634 (diff) |
Move WalletImpl from interfaces/wallet.cpp to wallet/interfaces.cpp
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/wallet/interfaces.cpp (renamed from src/interfaces/wallet.cpp) | 25 |
2 files changed, 20 insertions, 7 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 639b9c89ad..9f61670447 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -358,13 +358,13 @@ endif libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(SQLITE_CFLAGS) libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libbitcoin_wallet_a_SOURCES = \ - interfaces/wallet.cpp \ wallet/coincontrol.cpp \ wallet/context.cpp \ wallet/crypter.cpp \ wallet/db.cpp \ wallet/feebumper.cpp \ wallet/fees.cpp \ + wallet/interfaces.cpp \ wallet/load.cpp \ wallet/rpcdump.cpp \ wallet/rpcwallet.cpp \ diff --git a/src/interfaces/wallet.cpp b/src/wallet/interfaces.cpp index f68016b557..3fbba9ab92 100644 --- a/src/interfaces/wallet.cpp +++ b/src/wallet/interfaces.cpp @@ -31,9 +31,22 @@ #include <utility> #include <vector> -namespace interfaces { -namespace { +using interfaces::Chain; +using interfaces::FoundBlock; +using interfaces::Handler; +using interfaces::MakeHandler; +using interfaces::Wallet; +using interfaces::WalletAddress; +using interfaces::WalletBalances; +using interfaces::WalletClient; +using interfaces::WalletOrderForm; +using interfaces::WalletTx; +using interfaces::WalletTxOut; +using interfaces::WalletTxStatus; +using interfaces::WalletValueMap; +namespace wallet { +namespace { //! Construct wallet tx struct. WalletTx MakeWalletTx(CWallet& wallet, const CWalletTx& wtx) { @@ -561,14 +574,14 @@ public: std::vector<std::unique_ptr<Handler>> m_rpc_handlers; std::list<CRPCCommand> m_rpc_commands; }; - } // namespace +} // namespace wallet -std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet) { return wallet ? MakeUnique<WalletImpl>(wallet) : nullptr; } +namespace interfaces { +std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet) { return wallet ? MakeUnique<wallet::WalletImpl>(wallet) : nullptr; } std::unique_ptr<WalletClient> MakeWalletClient(Chain& chain, ArgsManager& args) { - return MakeUnique<WalletClientImpl>(chain, args); + return MakeUnique<wallet::WalletClientImpl>(chain, args); } - } // namespace interfaces |