Add logic to track pubkeys as watch-only, not just scripts

This commit is contained in:
Matt Corallo
2015-06-10 01:04:08 -07:00
parent d3354c52d7
commit f5813bdd3e
6 changed files with 52 additions and 13 deletions

View File

@@ -752,10 +752,9 @@ void SendCoinsDialog::coinControlChangeEdited(const QString& text)
}
else // Valid address
{
CPubKey pubkey;
CKeyID keyid;
addr.GetKeyID(keyid);
if (!model->getPubKey(keyid, pubkey)) // Unknown change address
if (!model->havePrivKey(keyid)) // Unknown change address
{
ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address"));
}