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-
This commit is contained in:
1 parent
63b5dfac21
commit
ff5f6dea53
26 files changed
+62
-62
No files matched your search
@@ -11,7 +11,7 @@
|
||||
|
||||
InitWalletDirTestingSetup::InitWalletDirTestingSetup(const std::string& chainName) : BasicTestingSetup(chainName)
|
||||
{
|
||||
m_wallet_client = MakeWalletClient(*m_node.chain, *Assert(m_node.args));
|
||||
m_wallet_loader = MakeWalletLoader(*m_node.chain, *Assert(m_node.args));
|
||||
|
||||
std::string sep;
|
||||
sep += fs::path::preferred_separator;
|
||||
|
||||
@@ -19,7 +19,7 @@ struct InitWalletDirTestingSetup: public BasicTestingSetup {
|
||||
fs::path m_datadir;
|
||||
fs::path m_cwd;
|
||||
std::map<std::string, fs::path> m_walletdir_path_cases;
|
||||
std::unique_ptr<interfaces::WalletClient> m_wallet_client;
|
||||
std::unique_ptr<interfaces::WalletLoader> m_wallet_loader;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H
|
||||
@@ -15,7 +15,7 @@ BOOST_FIXTURE_TEST_SUITE(init_tests, InitWalletDirTestingSetup)
|
||||
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_default)
|
||||
{
|
||||
SetWalletDir(m_walletdir_path_cases["default"]);
|
||||
bool result = m_wallet_client->verify();
|
||||
bool result = m_wallet_loader->verify();
|
||||
BOOST_CHECK(result == true);
|
||||
fs::path walletdir = fs::PathFromString(gArgs.GetArg("-walletdir", ""));
|
||||
fs::path expected_path = fs::canonical(m_walletdir_path_cases["default"]);
|
||||
@@ -25,7 +25,7 @@ BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_default)
|
||||
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_custom)
|
||||
{
|
||||
SetWalletDir(m_walletdir_path_cases["custom"]);
|
||||
bool result = m_wallet_client->verify();
|
||||
bool result = m_wallet_loader->verify();
|
||||
BOOST_CHECK(result == true);
|
||||
fs::path walletdir = fs::PathFromString(gArgs.GetArg("-walletdir", ""));
|
||||
fs::path expected_path = fs::canonical(m_walletdir_path_cases["custom"]);
|
||||
@@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_does_not_exist)
|
||||
SetWalletDir(m_walletdir_path_cases["nonexistent"]);
|
||||
{
|
||||
ASSERT_DEBUG_LOG("does not exist");
|
||||
bool result = m_wallet_client->verify();
|
||||
bool result = m_wallet_loader->verify();
|
||||
BOOST_CHECK(result == false);
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_is_not_directory)
|
||||
SetWalletDir(m_walletdir_path_cases["file"]);
|
||||
{
|
||||
ASSERT_DEBUG_LOG("is not a directory");
|
||||
bool result = m_wallet_client->verify();
|
||||
bool result = m_wallet_loader->verify();
|
||||
BOOST_CHECK(result == false);
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_is_not_relative)
|
||||
SetWalletDir(m_walletdir_path_cases["relative"]);
|
||||
{
|
||||
ASSERT_DEBUG_LOG("is a relative path");
|
||||
bool result = m_wallet_client->verify();
|
||||
bool result = m_wallet_loader->verify();
|
||||
BOOST_CHECK(result == false);
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_is_not_relative)
|
||||
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_no_trailing)
|
||||
{
|
||||
SetWalletDir(m_walletdir_path_cases["trailing"]);
|
||||
bool result = m_wallet_client->verify();
|
||||
bool result = m_wallet_loader->verify();
|
||||
BOOST_CHECK(result == true);
|
||||
fs::path walletdir = fs::PathFromString(gArgs.GetArg("-walletdir", ""));
|
||||
fs::path expected_path = fs::canonical(m_walletdir_path_cases["default"]);
|
||||
@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_no_trailing)
|
||||
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_no_trailing2)
|
||||
{
|
||||
SetWalletDir(m_walletdir_path_cases["trailing2"]);
|
||||
bool result = m_wallet_client->verify();
|
||||
bool result = m_wallet_loader->verify();
|
||||
BOOST_CHECK(result == true);
|
||||
fs::path walletdir = fs::PathFromString(gArgs.GetArg("-walletdir", ""));
|
||||
fs::path expected_path = fs::canonical(m_walletdir_path_cases["default"]);
|
||||
|
||||
@@ -12,7 +12,7 @@ WalletTestingSetup::WalletTestingSetup(const std::string& chainName)
|
||||
{
|
||||
m_wallet.LoadWallet();
|
||||
m_chain_notifications_handler = m_node.chain->handleNotifications({ &m_wallet, [](CWallet*) {} });
|
||||
m_wallet_client->registerRpcs();
|
||||
m_wallet_loader->registerRpcs();
|
||||
}
|
||||
|
||||
WalletTestingSetup::~WalletTestingSetup()
|
||||
|
||||
@@ -21,7 +21,7 @@ struct WalletTestingSetup : public TestingSetup {
|
||||
explicit WalletTestingSetup(const std::string& chainName = CBaseChainParams::MAIN);
|
||||
~WalletTestingSetup();
|
||||
|
||||
std::unique_ptr<interfaces::WalletClient> m_wallet_client = interfaces::MakeWalletClient(*m_node.chain, *Assert(m_node.args));
|
||||
std::unique_ptr<interfaces::WalletLoader> m_wallet_loader = interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args));
|
||||
CWallet m_wallet;
|
||||
std::unique_ptr<interfaces::Handler> m_chain_notifications_handler;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user