diff options
| author | MarcoFalke <[email protected]> | 2017-09-05 15:59:47 -0700 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2017-09-05 16:00:37 -0700 |
| commit | a31e9ad4f027955d43c04a05517244647e250161 (patch) | |
| tree | bc289dacc19c134f4e4c9778501c65b6bf517288 /src/qt/walletmodel.cpp | |
| parent | Merge #11246: github-merge: Coalesce git fetches (diff) | |
| parent | qt: Use IsMine to validate custom change address (diff) | |
| download | discoin-a31e9ad4f027955d43c04a05517244647e250161.tar.xz discoin-a31e9ad4f027955d43c04a05517244647e250161.zip | |
Merge #11247: qt: Use IsMine to validate custom change address
a1ea1cfbd qt: Use IsMine to validate custom change address (Chris Moore)
Pull request description:
Fixes #11137
Closes #11184 (which was accidentally opened against 0.15 branch)
Tree-SHA512: a20a59b4f36c1471a9c84bcc7c69048576d1f413104c299a7ed9ba221f28eddf93d727fca2926420ea5d0dd9aba582924f26a5acd44d995039b7202c73eb53bc
Diffstat (limited to 'src/qt/walletmodel.cpp')
| -rw-r--r-- | src/qt/walletmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 445d00e9c..a3f243a25 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -561,9 +561,9 @@ bool WalletModel::getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const return wallet->GetPubKey(address, vchPubKeyOut); } -bool WalletModel::havePrivKey(const CKeyID &address) const +bool WalletModel::IsSpendable(const CTxDestination& dest) const { - return wallet->HaveKey(address); + return IsMine(*wallet, dest) & ISMINE_SPENDABLE; } bool WalletModel::getPrivKey(const CKeyID &address, CKey& vchPrivKeyOut) const |