aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/coins.cpp
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-04-27 11:04:31 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-06-08 11:22:40 -0300
commit4b83bf8dbcf6b8b1c1293575391e90ac7e21b0e0 (patch)
tree4ac5a5f92709ae76159429c885834570527eecb0 /src/wallet/rpc/coins.cpp
parent3d8a2822570e3cf4d1bc4f9d59b5dcb0145920ad (diff)
downloadbitcoin-4b83bf8dbcf6b8b1c1293575391e90ac7e21b0e0.tar.xz
wallet: avoid extra IsSpentKey -> GetWalletTx lookups
Diffstat (limited to 'src/wallet/rpc/coins.cpp')
-rw-r--r--src/wallet/rpc/coins.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpc/coins.cpp b/src/wallet/rpc/coins.cpp
index 3eea03ff78..ad59cc94ff 100644
--- a/src/wallet/rpc/coins.cpp
+++ b/src/wallet/rpc/coins.cpp
@@ -649,7 +649,7 @@ RPCHelpMan listunspent()
CTxDestination address;
const CScript& scriptPubKey = out.txout.scriptPubKey;
bool fValidAddress = ExtractDestination(scriptPubKey, address);
- bool reused = avoid_reuse && pwallet->IsSpentKey(out.outpoint.hash, out.outpoint.n);
+ bool reused = avoid_reuse && pwallet->IsSpentKey(scriptPubKey);
if (destinations.size() && (!fValidAddress || !destinations.count(address)))
continue;