IsUsedDestination should count any known single-key address

This commit is contained in:
Gregory Sanders
2019-11-27 10:56:04 -05:00
parent d8a66626d6
commit 09502452bb
4 changed files with 47 additions and 15 deletions

View File

@@ -2927,7 +2927,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;