From a1ea1cfbd8d4fc976f0ab2423d395e03ded6eedd Mon Sep 17 00:00:00 2001 From: Chris Moore Date: Wed, 30 Aug 2017 00:32:54 -0700 Subject: qt: Use IsMine to validate custom change address (cherry picked from commit c41224dfd51c896341bbf2fa23e160bf5ffe27c3) --- src/qt/walletmodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qt/walletmodel.cpp') diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index ba0e1da0c7..5b63af617d 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 -- cgit v1.2.3