From 8d624d358e7a5d7a2ae66af209dbdc33501af0a8 Mon Sep 17 00:00:00 2001 From: levoncrypto Date: Tue, 7 May 2024 17:26:24 +0400 Subject: [PATCH 1/2] Transaction large error message change --- src/qt/bitcoinstrings.cpp | 2 +- src/spark/sparkwallet.cpp | 4 ++-- src/wallet/lelantusjoinsplitbuilder.cpp | 2 +- src/wallet/txbuilder.cpp | 2 +- src/wallet/wallet.cpp | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index a26f1cf886..4a2d44de0d 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -553,7 +553,7 @@ QT_TRANSLATE_NOOP("firo-core", "Transaction has too long of a mempool chain"), QT_TRANSLATE_NOOP("firo-core", "Transaction must have at least one recipient"), QT_TRANSLATE_NOOP("firo-core", "Transaction not valid."), QT_TRANSLATE_NOOP("firo-core", "Transaction too large for fee policy"), -QT_TRANSLATE_NOOP("firo-core", "Transaction too large"), +QT_TRANSLATE_NOOP("firo-core", "This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"), QT_TRANSLATE_NOOP("firo-core", "Trying to spend an already spent serial #, try again."), QT_TRANSLATE_NOOP("firo-core", "Unable to bind to %s on this computer (bind returned error %s)"), QT_TRANSLATE_NOOP("firo-core", "Unable to bind to %s on this computer. %s is probably already running."), diff --git a/src/spark/sparkwallet.cpp b/src/spark/sparkwallet.cpp index 23bd19ab49..33c90f6bf9 100644 --- a/src/spark/sparkwallet.cpp +++ b/src/spark/sparkwallet.cpp @@ -1024,7 +1024,7 @@ bool CSparkWallet::CreateSparkMintTransactions( // Limit size CTransaction txConst(tx); if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) { - strFailReason = _("Transaction too large"); + strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"); return false; } dPriority = txConst.ComputePriority(dPriority, nBytes); @@ -1536,7 +1536,7 @@ CWalletTx CSparkWallet::CreateSparkSpendTransaction( } if (GetTransactionWeight(tx) >= MAX_NEW_TX_WEIGHT) { - throw std::runtime_error(_("Transaction too large")); + throw std::runtime_error(_("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again")); } // check fee diff --git a/src/wallet/lelantusjoinsplitbuilder.cpp b/src/wallet/lelantusjoinsplitbuilder.cpp index a10eb4483f..d2b6c7431b 100644 --- a/src/wallet/lelantusjoinsplitbuilder.cpp +++ b/src/wallet/lelantusjoinsplitbuilder.cpp @@ -321,7 +321,7 @@ CWalletTx LelantusJoinSplitBuilder::Build( result.SetTx(MakeTransactionRef(tx)); if (GetTransactionWeight(tx) >= MAX_NEW_TX_WEIGHT) { - throw std::runtime_error(_("Transaction too large")); + throw std::runtime_error(_("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again")); } // check fee diff --git a/src/wallet/txbuilder.cpp b/src/wallet/txbuilder.cpp index 1419db6cbf..5b1b99f0c7 100644 --- a/src/wallet/txbuilder.cpp +++ b/src/wallet/txbuilder.cpp @@ -224,7 +224,7 @@ CWalletTx TxBuilder::Build(const std::vector& recipients, CAmount& f result.SetTx(MakeTransactionRef(tx)); if (GetTransactionWeight(tx) >= MAX_STANDARD_TX_WEIGHT) { - throw std::runtime_error(_("Transaction too large")); + throw std::runtime_error(_("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again")); } // check fee diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index fababfae30..a1b0ed3444 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4566,7 +4566,7 @@ bool CWallet::CreateTransaction(const std::vector& vecSend, CWalletT if (GetTransactionWeight(txNew) >= MAX_STANDARD_TX_WEIGHT) { // Do not create oversized transactions (bad-txns-oversize). - strFailReason = _("Transaction too large"); + strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"); return false; } @@ -4991,7 +4991,7 @@ bool CWallet::CreateMintTransaction(const std::vector &vecSend, CWa // Limit size if (GetTransactionWeight(*wtxNew.tx) >= MAX_STANDARD_TX_WEIGHT) { - strFailReason = _("Transaction too large"); + strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"); return false; } dPriority = wtxNew.tx->ComputePriority(dPriority, nBytes); @@ -5271,7 +5271,7 @@ bool CWallet::CreateLelantusMintTransactions( // Limit size CTransaction txConst(tx); if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) { - strFailReason = _("Transaction too large"); + strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"); return false; } dPriority = txConst.ComputePriority(dPriority, nBytes); From 5748ccb7752d08f9a5d02f96f7e550a4c6b9738a Mon Sep 17 00:00:00 2001 From: levoncrypto Date: Thu, 9 May 2024 14:56:44 +0400 Subject: [PATCH 2/2] =?UTF-8?q?=D0=95diting=20error=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/qt/bitcoinstrings.cpp | 2 +- src/spark/sparkwallet.cpp | 4 ++-- src/wallet/lelantusjoinsplitbuilder.cpp | 2 +- src/wallet/txbuilder.cpp | 2 +- src/wallet/wallet.cpp | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index 4a2d44de0d..6b4d5aff98 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -553,7 +553,7 @@ QT_TRANSLATE_NOOP("firo-core", "Transaction has too long of a mempool chain"), QT_TRANSLATE_NOOP("firo-core", "Transaction must have at least one recipient"), QT_TRANSLATE_NOOP("firo-core", "Transaction not valid."), QT_TRANSLATE_NOOP("firo-core", "Transaction too large for fee policy"), -QT_TRANSLATE_NOOP("firo-core", "This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"), +QT_TRANSLATE_NOOP("firo-core", "Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"), QT_TRANSLATE_NOOP("firo-core", "Trying to spend an already spent serial #, try again."), QT_TRANSLATE_NOOP("firo-core", "Unable to bind to %s on this computer (bind returned error %s)"), QT_TRANSLATE_NOOP("firo-core", "Unable to bind to %s on this computer. %s is probably already running."), diff --git a/src/spark/sparkwallet.cpp b/src/spark/sparkwallet.cpp index 33c90f6bf9..0852256861 100644 --- a/src/spark/sparkwallet.cpp +++ b/src/spark/sparkwallet.cpp @@ -1024,7 +1024,7 @@ bool CSparkWallet::CreateSparkMintTransactions( // Limit size CTransaction txConst(tx); if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) { - strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"); + strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false; } dPriority = txConst.ComputePriority(dPriority, nBytes); @@ -1536,7 +1536,7 @@ CWalletTx CSparkWallet::CreateSparkSpendTransaction( } if (GetTransactionWeight(tx) >= MAX_NEW_TX_WEIGHT) { - throw std::runtime_error(_("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again")); + throw std::runtime_error(_("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs")); } // check fee diff --git a/src/wallet/lelantusjoinsplitbuilder.cpp b/src/wallet/lelantusjoinsplitbuilder.cpp index d2b6c7431b..eba439524c 100644 --- a/src/wallet/lelantusjoinsplitbuilder.cpp +++ b/src/wallet/lelantusjoinsplitbuilder.cpp @@ -321,7 +321,7 @@ CWalletTx LelantusJoinSplitBuilder::Build( result.SetTx(MakeTransactionRef(tx)); if (GetTransactionWeight(tx) >= MAX_NEW_TX_WEIGHT) { - throw std::runtime_error(_("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again")); + throw std::runtime_error(_("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs")); } // check fee diff --git a/src/wallet/txbuilder.cpp b/src/wallet/txbuilder.cpp index 5b1b99f0c7..637bc26a14 100644 --- a/src/wallet/txbuilder.cpp +++ b/src/wallet/txbuilder.cpp @@ -224,7 +224,7 @@ CWalletTx TxBuilder::Build(const std::vector& recipients, CAmount& f result.SetTx(MakeTransactionRef(tx)); if (GetTransactionWeight(tx) >= MAX_STANDARD_TX_WEIGHT) { - throw std::runtime_error(_("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again")); + throw std::runtime_error(_("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs")); } // check fee diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a1b0ed3444..0aa4b89c96 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4566,7 +4566,7 @@ bool CWallet::CreateTransaction(const std::vector& vecSend, CWalletT if (GetTransactionWeight(txNew) >= MAX_STANDARD_TX_WEIGHT) { // Do not create oversized transactions (bad-txns-oversize). - strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"); + strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false; } @@ -4991,7 +4991,7 @@ bool CWallet::CreateMintTransaction(const std::vector &vecSend, CWa // Limit size if (GetTransactionWeight(*wtxNew.tx) >= MAX_STANDARD_TX_WEIGHT) { - strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"); + strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false; } dPriority = wtxNew.tx->ComputePriority(dPriority, nBytes); @@ -5271,7 +5271,7 @@ bool CWallet::CreateLelantusMintTransactions( // Limit size CTransaction txConst(tx); if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) { - strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"); + strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false; } dPriority = txConst.ComputePriority(dPriority, nBytes);