Skip to content

Commit 9a3c5c8

Browse files
committed
scripted-diff: rename ZapSelectTx to RemoveTxs
-BEGIN VERIFY SCRIPT- sed -i 's/ZapSelectTx/RemoveTxs/g' $(git grep -l 'ZapSelectTx' ./src/wallet) -END VERIFY SCRIPT-
1 parent 83b7628 commit 9a3c5c8

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/wallet/rpc/backup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ RPCHelpMan removeprunedfunds()
394394
uint256 hash(ParseHashV(request.params[0], "txid"));
395395
std::vector<uint256> vHash;
396396
vHash.push_back(hash);
397-
if (auto res = pwallet->ZapSelectTx(vHash); !res) {
397+
if (auto res = pwallet->RemoveTxs(vHash); !res) {
398398
throw JSONRPCError(RPC_WALLET_ERROR, util::ErrorString(res).original);
399399
}
400400

src/wallet/test/wallet_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ BOOST_FIXTURE_TEST_CASE(CreateWalletWithoutChain, BasicTestingSetup)
892892
UnloadWallet(std::move(wallet));
893893
}
894894

895-
BOOST_FIXTURE_TEST_CASE(ZapSelectTx, TestChain100Setup)
895+
BOOST_FIXTURE_TEST_CASE(RemoveTxs, TestChain100Setup)
896896
{
897897
m_args.ForceSetArg("-unsafesqlitesync", "1");
898898
WalletContext context;
@@ -919,7 +919,7 @@ BOOST_FIXTURE_TEST_CASE(ZapSelectTx, TestChain100Setup)
919919
BOOST_CHECK_EQUAL(wallet->mapWallet.count(block_hash), 1u);
920920

921921
std::vector<uint256> vHashIn{ block_hash };
922-
BOOST_CHECK(wallet->ZapSelectTx(vHashIn));
922+
BOOST_CHECK(wallet->RemoveTxs(vHashIn));
923923

924924
BOOST_CHECK(!wallet->HasWalletSpend(prev_tx));
925925
BOOST_CHECK_EQUAL(wallet->mapWallet.count(block_hash), 0u);

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,7 +2311,7 @@ DBErrors CWallet::LoadWallet()
23112311
return nLoadWalletRet;
23122312
}
23132313

2314-
util::Result<void> CWallet::ZapSelectTx(std::vector<uint256>& txs_to_remove)
2314+
util::Result<void> CWallet::RemoveTxs(std::vector<uint256>& txs_to_remove)
23152315
{
23162316
AssertLockHeld(cs_wallet);
23172317
WalletBatch batch(GetDatabase());
@@ -3951,7 +3951,7 @@ bool CWallet::ApplyMigrationData(MigrationData& data, bilingual_str& error)
39513951
watchonly_batch.reset(); // Flush
39523952
// Do the removes
39533953
if (txids_to_delete.size() > 0) {
3954-
if (auto res = ZapSelectTx(txids_to_delete); !res) {
3954+
if (auto res = RemoveTxs(txids_to_delete); !res) {
39553955
error = _("Error: Could not delete watchonly transactions. ") + util::ErrorString(res);
39563956
return false;
39573957
}

src/wallet/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
789789
DBErrors LoadWallet();
790790

791791
/** Erases the provided transactions from the wallet. */
792-
util::Result<void> ZapSelectTx(std::vector<uint256>& txs_to_remove) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
792+
util::Result<void> RemoveTxs(std::vector<uint256>& txs_to_remove) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
793793

794794
bool SetAddressBook(const CTxDestination& address, const std::string& strName, const std::optional<AddressPurpose>& purpose);
795795

0 commit comments

Comments
 (0)