mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Replace CScriptID and CKeyID in CTxDestination with dedicated types
This commit is contained in:
@@ -120,8 +120,8 @@ void SignVerifyMessageDialog::on_signMessageButton_SM_clicked()
|
||||
ui->statusLabel_SM->setText(tr("The entered address is invalid.") + QString(" ") + tr("Please check the address and try again."));
|
||||
return;
|
||||
}
|
||||
const CKeyID* keyID = boost::get<CKeyID>(&destination);
|
||||
if (!keyID) {
|
||||
const PKHash* pkhash = boost::get<PKHash>(&destination);
|
||||
if (!pkhash) {
|
||||
ui->addressIn_SM->setValid(false);
|
||||
ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_SM->setText(tr("The entered address does not refer to a key.") + QString(" ") + tr("Please check the address and try again."));
|
||||
@@ -137,7 +137,7 @@ void SignVerifyMessageDialog::on_signMessageButton_SM_clicked()
|
||||
}
|
||||
|
||||
CKey key;
|
||||
if (!model->wallet().getPrivKey(*keyID, key))
|
||||
if (!model->wallet().getPrivKey(CKeyID(*pkhash), key))
|
||||
{
|
||||
ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_SM->setText(tr("Private key for the entered address is not available."));
|
||||
@@ -198,7 +198,7 @@ void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked()
|
||||
ui->statusLabel_VM->setText(tr("The entered address is invalid.") + QString(" ") + tr("Please check the address and try again."));
|
||||
return;
|
||||
}
|
||||
if (!boost::get<CKeyID>(&destination)) {
|
||||
if (!boost::get<PKHash>(&destination)) {
|
||||
ui->addressIn_VM->setValid(false);
|
||||
ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_VM->setText(tr("The entered address does not refer to a key.") + QString(" ") + tr("Please check the address and try again."));
|
||||
@@ -229,7 +229,7 @@ void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked()
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(CTxDestination(pubkey.GetID()) == destination)) {
|
||||
if (!(CTxDestination(PKHash(pubkey)) == destination)) {
|
||||
ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }");
|
||||
ui->statusLabel_VM->setText(QString("<nobr>") + tr("Message verification failed.") + QString("</nobr>"));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user