Skip to content

Commit cdf185c

Browse files
committed
wallet: remove unused IsSpentKey(hash, index) method
1 parent 4b83bf8 commit cdf185c

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/wallet/wallet.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -906,15 +906,6 @@ void CWallet::SetSpentKeyState(WalletBatch& batch, const uint256& hash, unsigned
906906
}
907907
}
908908

909-
bool CWallet::IsSpentKey(const uint256& hash, unsigned int n) const
910-
{
911-
AssertLockHeld(cs_wallet);
912-
const CWalletTx* srctx = GetWalletTx(hash);
913-
if (!srctx) return false;
914-
assert(srctx->tx->vout.size() > n);
915-
return IsSpentKey(srctx->tx->vout[n].scriptPubKey);
916-
}
917-
918909
bool CWallet::IsSpentKey(const CScript& scriptPubKey) const
919910
{
920911
AssertLockHeld(cs_wallet);

src/wallet/wallet.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
443443

444444
bool IsSpent(const COutPoint& outpoint) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
445445

446-
// Whether this or any known UTXO with the same single key has been spent.
447-
bool IsSpentKey(const uint256& hash, unsigned int n) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
446+
// Whether this or any known scriptPubKey with the same single key has been spent.
448447
bool IsSpentKey(const CScript& scriptPubKey) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
449448
void SetSpentKeyState(WalletBatch& batch, const uint256& hash, unsigned int n, bool used, std::set<CTxDestination>& tx_destinations) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
450449

0 commit comments

Comments
 (0)