aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorGregory Sanders <gsanders87@gmail.com>2019-11-27 10:56:04 -0500
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2020-01-14 10:35:34 +0000
commita5489c9892fc12cb70c6c7b017881a9218d0b041 (patch)
tree5b12ab6f3438443e7816c20b50bf12e65b7b3c44 /src/wallet/rpcwallet.cpp
parent88729d804e39fbb42aa92c039afe3641edf9190c (diff)
downloadbitcoin-a5489c9892fc12cb70c6c7b017881a9218d0b041.tar.xz
IsUsedDestination should count any known single-key address
Github-Pull: #17621 Rebased-From: 09502452bbbe21bb974f1de8cf53196373921ab9
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 2b1f9f3752..fe004a862d 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2924,7 +2924,7 @@ static UniValue listunspent(const JSONRPCRequest& request)
CTxDestination address;
const CScript& scriptPubKey = out.tx->tx->vout[out.i].scriptPubKey;
bool fValidAddress = ExtractDestination(scriptPubKey, address);
- bool reused = avoid_reuse && pwallet->IsUsedDestination(address);
+ bool reused = avoid_reuse && pwallet->IsUsedDestination(out.tx->GetHash(), out.i);
if (destinations.size() && (!fValidAddress || !destinations.count(address)))
continue;