scripted-diff: refactor: CWallet::Create() -> CreateNew()

Aside from being more legible, changing the name of `CWallet::Create()`
also validates that every instance where a new wallet is `Create()`'ed
is handled in this branch.

-BEGIN VERIFY SCRIPT-
sed -i 's|\bCreate(|CreateNew(|g' src/wallet/wallet.cpp  src/wallet/wallet.h  src/wallet/test/util.cpp src/wallet/test/wallet_tests.cpp
-END VERIFY SCRIPT-
This commit is contained in:
David Gumberg
2025-05-28 16:23:35 -07:00
parent 27e021ebc0
commit db2effaca4
4 changed files with 7 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ std::shared_ptr<CWallet> TestCreateWallet(std::unique_ptr<WalletDatabase> databa
{
bilingual_str _error;
std::vector<bilingual_str> _warnings;
auto wallet = CWallet::Create(context, "", std::move(database), create_flags, _error, _warnings);
auto wallet = CWallet::CreateNew(context, "", std::move(database), create_flags, _error, _warnings);
NotifyWalletLoaded(context, wallet);
if (context.chain) {
wallet->postInitProcess();

View File

@@ -559,7 +559,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_descriptor_test, BasicTestingSetup)
BOOST_CHECK_EXCEPTION(vr >> w_desc, std::ios_base::failure, malformed_descriptor);
}
//! Test CWallet::Create() and its behavior handling potential race
//! Test CWallet::CreateNew() and its behavior handling potential race
//! conditions if it's called the same time an incoming transaction shows up in
//! the mempool or a new block.
//!