aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-07-28 11:05:20 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-07-28 11:05:32 +0200
commit1369d699b6221818dc9ca72eb6c0cea30eeee914 (patch)
tree993e2e5afe07efbf69c8cc5182d0efc081d3c63e
parent08e9c57ba2aa808c608daa0b4503f1940a356f8c (diff)
parent5e56ef5152cd98133c3b8575321dfe7dd253bd7d (diff)
Merge pull request #6484
5e56ef5 qt: use CHashWriter also in SignVerifyMessageDialog (Pavel Vasin)
-rw-r--r--src/qt/signverifymessagedialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp
index ce166f3672..d3984923a8 100644
--- a/src/qt/signverifymessagedialog.cpp
+++ b/src/qt/signverifymessagedialog.cpp
@@ -148,12 +148,12 @@ void SignVerifyMessageDialog::on_signMessageButton_SM_clicked()
return;
}
- CDataStream ss(SER_GETHASH, 0);
+ CHashWriter ss(SER_GETHASH, 0);
ss << strMessageMagic;
ss << ui->messageIn_SM->document()->toPlainText().toStdString();
std::vector<unsigned char> vchSig;
- if (!key.SignCompact(Hash(ss.begin(), ss.end()), vchSig))
+ if (!key.SignCompact(ss.GetHash(), vchSig))
{
ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }");
ui->statusLabel_SM->setText(QString("<nobr>") + tr("Message signing failed.") + QString("</nobr>"));
@@ -223,12 +223,12 @@ void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked()
return;
}
- CDataStream ss(SER_GETHASH, 0);
+ CHashWriter ss(SER_GETHASH, 0);
ss << strMessageMagic;
ss << ui->messageIn_VM->document()->toPlainText().toStdString();
CPubKey pubkey;
- if (!pubkey.RecoverCompact(Hash(ss.begin(), ss.end()), vchSig))
+ if (!pubkey.RecoverCompact(ss.GetHash(), vchSig))
{
ui->signatureIn_VM->setValid(false);
ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }");