From 5770f73b3d525f34d283f2b5b2123aa3c030adf6 Mon Sep 17 00:00:00 2001 From: DanS Date: Thu, 26 Nov 2026 22:26:29 -0600 Subject: [PATCH] wallet/rpc: remove the unused Lock2NSPV/Unlock2NSPV Neither has a caller anywhere in the tree. Both took cs_main and cs_wallet by hand, so any future caller that threw between them would have leaked both locks. Remove them rather than keep a trap. Co-Authored-By: Claude Opus 5.5 (1M context) --- src/wallet/rpcwallet.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index eb5970894..496541fff 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -113,23 +113,6 @@ void EnsureWalletIsUnlocked() throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); } -void Lock2NSPV(const CPubKey &pk) -{ - if (!pk.IsValid()) - { - ENTER_CRITICAL_SECTION(cs_main); - ENTER_CRITICAL_SECTION(pwalletMain->cs_wallet); - } -} - -void Unlock2NSPV(const CPubKey &pk) -{ - if (!pk.IsValid()) - { - LEAVE_CRITICAL_SECTION(cs_main); - LEAVE_CRITICAL_SECTION(pwalletMain->cs_wallet); - } -} void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry) {