From 0c3a151bec4b1b7c8695b3e7eed1636c895766ec Mon Sep 17 00:00:00 2001 From: fsb4000 Date: Sun, 11 Jan 2015 13:55:16 +0600 Subject: [PATCH] RedeemScriptSizeWarn https://github.com/novacoin-project/novacoin/issues/107 --- src/qt/locale/bitcoin_ru.ts | 22 +++++++++++++++++----- src/qt/multisigdialog.cpp | 5 +++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index 4aa2297..13cd474 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -59,27 +59,39 @@ MultisigDialog - + + Error + Ошибка + + + + Redeem script exceeds size limit: %1 > %2 +Reduce the number of addresses involved in the address creation. + Скрипт выплаты превышает максимальный размер: %1 > %2 +Уменьшите число адресов, участвующих в создании адреса с мультиподписью + + + Transaction signature is complete Подписание транзакции завершено - + Transaction is NOT completely signed Подписание транзакции завершено не полностью - + Confirm send transaction Подтвердите отправку транзакции - + The fee of the transaction (%1 NVC) is smaller than the expected fee (%2 NVC). Do you want to send the transaction anyway? Комиссия (%1 NVC) меньше необходимой (%2 NVC). Вы хотите отправить транзакцию без изменений? - + The fee of the transaction (%1 NVC) is bigger than the expected fee (%2 NVC). Do you want to send the transaction anyway? Комиссия (%1 NVC) больше необходимой (%2 NVC). Вы хотите отправить транзакцию без изменений? diff --git a/src/qt/multisigdialog.cpp b/src/qt/multisigdialog.cpp index 8e237cb..144f370 100644 --- a/src/qt/multisigdialog.cpp +++ b/src/qt/multisigdialog.cpp @@ -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); -- 1.7.1