RedeemScriptSizeWarn 111/head
authorfsb4000 <fsb4000@yandex.ru>
Sun, 11 Jan 2015 07:55:16 +0000 (13:55 +0600)
committerfsb4000 <fsb4000@yandex.ru>
Sun, 11 Jan 2015 07:55:16 +0000 (13:55 +0600)
https://github.com/novacoin-project/novacoin/issues/107

src/qt/locale/bitcoin_ru.ts
src/qt/multisigdialog.cpp

index 4aa2297..13cd474 100644 (file)
   <context>
     <name>MultisigDialog</name>
     <message>
-      <location filename="../multisigdialog.cpp" line="473"/>
+      <location filename="../multisigdialog.cpp" line="174"/>
+      <source>Error</source>
+      <translation>Ошибка</translation>
+    </message>
+    <message>
+      <location filename="../multisigdialog.cpp" line="174"/>
+      <source>Redeem script exceeds size limit: %1 > %2
+Reduce the number of addresses involved in the address creation.</source>
+      <translation>Скрипт выплаты превышает максимальный размер: %1 > %2
+Уменьшите число адресов, участвующих в создании адреса с мультиподписью</translation>
+    </message>
+    <message>
+      <location filename="../multisigdialog.cpp" line="478"/>
       <source>Transaction signature is complete</source>
       <translation>Подписание транзакции завершено</translation>
     </message>
     <message>
-      <location filename="../multisigdialog.cpp" line="478"/>
+      <location filename="../multisigdialog.cpp" line="483"/>
       <source>Transaction is NOT completely signed</source>
       <translation>Подписание транзакции завершено не полностью</translation>
     </message>
     <message>
-      <location filename="../multisigdialog.cpp" line="499"/>
+      <location filename="../multisigdialog.cpp" line="504"/>
       <source>Confirm send transaction</source>
       <translation>Подтвердите отправку транзакции</translation>
     </message>
     <message>
-      <location filename="../multisigdialog.cpp" line="499"/>
+      <location filename="../multisigdialog.cpp" line="504"/>
       <source>The fee of the transaction (%1 NVC) is smaller than the expected fee (%2 NVC). Do you want to send the transaction anyway?</source>
       <translation>Комиссия (%1 NVC) меньше необходимой (%2 NVC). Вы хотите отправить транзакцию без изменений?</translation>
     </message>
     <message>
-      <location filename="../multisigdialog.cpp" line="505"/>
+      <location filename="../multisigdialog.cpp" line="509"/>
       <source>The fee of the transaction (%1 NVC) is bigger than the expected fee (%2 NVC). Do you want to send the transaction anyway?</source>
       <translation>Комиссия (%1 NVC) больше необходимой (%2 NVC). Вы хотите отправить транзакцию без изменений?</translation>
     </message>
index 8e237cb..144f370 100644 (file)
@@ -169,6 +169,11 @@ void MultisigDialog::on_createAddressButton_clicked()
 
     CScript script;
     script.SetMultisig(required, pubkeys);
+    if (script.size() > MAX_SCRIPT_ELEMENT_SIZE)
+    {
+        QMessageBox::warning(this, tr("Error"), tr("Redeem script exceeds size limit: %1 > %2\nReduce the number of addresses involved in the address creation.").arg(script.size()).arg(MAX_SCRIPT_ELEMENT_SIZE), QMessageBox::Ok);
+        return;
+    }
     CScriptID scriptID = script.GetID();
     CBitcoinAddress address(scriptID);