From ff5f6dea5336075d1a6cace1112be3252d97540b Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Wed, 22 Dec 2021 13:44:55 -0500 Subject: scripted-diff: Rename interfaces::WalletClient to interfaces::WalletLoader Name has been confusing since it was introduced, and it was pointed in recent review club as https://bitcoincore.reviews/10102 that it was particularly unclear how interfaces::WalletClient was different from interfaces::Wallet. -BEGIN VERIFY SCRIPT- ren() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; } ren WalletClient WalletLoader ren walletClient walletLoader ren wallet_client wallet_loader ren "wallet clients release the wallet" "wallet pointer owners release the wallet" ren "wallet client" "wallet loader" ren "Wallet client" "Wallet loader" -END VERIFY SCRIPT- --- src/interfaces/init.cpp | 2 +- src/interfaces/init.h | 4 ++-- src/interfaces/node.h | 8 ++++---- src/interfaces/wallet.h | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/interfaces') diff --git a/src/interfaces/init.cpp b/src/interfaces/init.cpp index a3c949e616..f0f8aa5fed 100644 --- a/src/interfaces/init.cpp +++ b/src/interfaces/init.cpp @@ -11,7 +11,7 @@ namespace interfaces { std::unique_ptr Init::makeNode() { return {}; } std::unique_ptr Init::makeChain() { return {}; } -std::unique_ptr Init::makeWalletClient(Chain& chain) { return {}; } +std::unique_ptr Init::makeWalletLoader(Chain& chain) { return {}; } std::unique_ptr Init::makeEcho() { return {}; } Ipc* Init::ipc() { return nullptr; } } // namespace interfaces diff --git a/src/interfaces/init.h b/src/interfaces/init.h index 2a38054a17..a4ecf4b5d1 100644 --- a/src/interfaces/init.h +++ b/src/interfaces/init.h @@ -14,7 +14,7 @@ class Chain; class Echo; class Ipc; class Node; -class WalletClient; +class WalletLoader; //! Initial interface created when a process is first started, and used to give //! and get access to other interfaces (Node, Chain, Wallet, etc). @@ -29,7 +29,7 @@ public: virtual ~Init() = default; virtual std::unique_ptr makeNode(); virtual std::unique_ptr makeChain(); - virtual std::unique_ptr makeWalletClient(Chain& chain); + virtual std::unique_ptr makeWalletLoader(Chain& chain); virtual std::unique_ptr makeEcho(); virtual Ipc* ipc(); }; diff --git a/src/interfaces/node.h b/src/interfaces/node.h index 974156e6e1..cf45b0b392 100644 --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -37,7 +37,7 @@ struct bilingual_str; namespace interfaces { class Handler; -class WalletClient; +class WalletLoader; struct BlockTip; //! Block and header tip information @@ -187,8 +187,8 @@ public: //! Broadcast transaction. virtual TransactionError broadcastTransaction(CTransactionRef tx, CAmount max_tx_fee, std::string& err_string) = 0; - //! Get wallet client. - virtual WalletClient& walletClient() = 0; + //! Get wallet loader. + virtual WalletLoader& walletLoader() = 0; //! Register handler for init messages. using InitMessageFn = std::function; @@ -210,7 +210,7 @@ public: using ShowProgressFn = std::function; virtual std::unique_ptr handleShowProgress(ShowProgressFn fn) = 0; - //! Register handler for wallet client constructed messages. + //! Register handler for wallet loader constructed messages. using InitWalletFn = std::function; virtual std::unique_ptr handleInitWallet(InitWalletFn fn) = 0; diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h index 77e15fc097..a02134f2b2 100644 --- a/src/interfaces/wallet.h +++ b/src/interfaces/wallet.h @@ -313,7 +313,7 @@ public: //! Wallet chain client that in addition to having chain client methods for //! starting up, shutting down, and registering RPCs, also has additional //! methods (called by the GUI) to load and create wallets. -class WalletClient : public ChainClient +class WalletLoader : public ChainClient { public: //! Create new wallet. @@ -422,9 +422,9 @@ struct WalletTxOut //! dummywallet.cpp and throws if the wallet component is not compiled. std::unique_ptr MakeWallet(WalletContext& context, const std::shared_ptr& wallet); -//! Return implementation of ChainClient interface for a wallet client. This +//! Return implementation of ChainClient interface for a wallet loader. This //! function will be undefined in builds where ENABLE_WALLET is false. -std::unique_ptr MakeWalletClient(Chain& chain, ArgsManager& args); +std::unique_ptr MakeWalletLoader(Chain& chain, ArgsManager& args); } // namespace interfaces -- cgit v1.2.3