From 0225a9a5c9bca5b87172ba5ee3d98fa7992a71bd Mon Sep 17 00:00:00 2001 From: fsb4000 Date: Wed, 14 Jan 2015 17:54:25 +0600 Subject: [PATCH] =?utf8?q?=D0=BF=D1=80=D0=B5=D0=B4=D1=83=D0=BF=D1=80=D0=B5=D0=B6=D0=B4=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D1=80=D0=B8=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D0=B8=20=D0=B0=D0=B4=D1=80=D0=B5=D1=81=D0=B0=20=D1=81=20=D0=BC=D1=83=D0=BB=D1=8C=D1=82=D0=B8=D0=BF=D0=BE=D0=B4=D0=BF=D0=B8=D1=81=D1=8C=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit для решения https://github.com/novacoin-project/novacoin/issues/110 --- src/qt/multisigdialog.cpp | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/src/qt/multisigdialog.cpp b/src/qt/multisigdialog.cpp index 144f370..e8ad839 100644 --- a/src/qt/multisigdialog.cpp +++ b/src/qt/multisigdialog.cpp @@ -164,9 +164,24 @@ void MultisigDialog::on_createAddressButton_clicked() pubkeys[i].SetPubKey(vchPubKey); } - if((required == 0) || (required > pubkeys.size())) + if(pubkeys.size() > 16) + { + QMessageBox::warning(this, tr("Error"), tr("Number of addresses involved in the address creation > %1\nReduce the number").arg(16), QMessageBox::Ok); return; + } + if(required == 0) + { + QMessageBox::warning(this, tr("Error"), tr("Number of required signatures is 0\nNumber of required signatures must be between 1 and number of keys involved in the creation of address."), QMessageBox::Ok); + return; + } + + if(required > pubkeys.size()) + { + QMessageBox::warning(this, tr("Error"), tr("Number of required signatures > Number of keys involved in the creation of address."), QMessageBox::Ok); + return; + } + CScript script; script.SetMultisig(required, pubkeys); if (script.size() > MAX_SCRIPT_ELEMENT_SIZE) -- 1.7.1