X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Fmultisigdialog.cpp;fp=src%2Fqt%2Fmultisigdialog.cpp;h=e8ad839244324b9f08b1032535b6eaf8bc9eb9a5;hb=0225a9a5c9bca5b87172ba5ee3d98fa7992a71bd;hp=144f37088860d150e9800a521619cc3c100119cb;hpb=488efc3aee9eae2c6dcdc181305e0c9d80eb3c13;p=novacoin.git 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)