Skip to content

Commit

Permalink
Transaction large error message change (#1438)
Browse files Browse the repository at this point in the history
* Transaction large error message change

* Еditing error message
  • Loading branch information
levoncrypto authored May 13, 2024
1 parent 065a60a commit cf19353
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/qt/bitcoinstrings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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", "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."),
Expand Down
4 changes: 2 additions & 2 deletions src/spark/sparkwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ bool CSparkWallet::CreateSparkMintTransactions(
// Limit size
CTransaction txConst(tx);
if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) {
strFailReason = _("Transaction too large");
strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs");
return false;
}
dPriority = txConst.ComputePriority(dPriority, nBytes);
Expand Down Expand Up @@ -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(_("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"));
}

// check fee
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/lelantusjoinsplitbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(_("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"));
}

// check fee
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/txbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ CWalletTx TxBuilder::Build(const std::vector<CRecipient>& 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(_("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"));
}

// check fee
Expand Down
6 changes: 3 additions & 3 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4566,7 +4566,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT

if (GetTransactionWeight(txNew) >= MAX_STANDARD_TX_WEIGHT) {
// Do not create oversized transactions (bad-txns-oversize).
strFailReason = _("Transaction too large");
strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs");
return false;
}

Expand Down Expand Up @@ -4991,7 +4991,7 @@ bool CWallet::CreateMintTransaction(const std::vector <CRecipient> &vecSend, CWa

// Limit size
if (GetTransactionWeight(*wtxNew.tx) >= MAX_STANDARD_TX_WEIGHT) {
strFailReason = _("Transaction too large");
strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs");
return false;
}
dPriority = wtxNew.tx->ComputePriority(dPriority, nBytes);
Expand Down Expand Up @@ -5271,7 +5271,7 @@ bool CWallet::CreateLelantusMintTransactions(
// Limit size
CTransaction txConst(tx);
if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) {
strFailReason = _("Transaction too large");
strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs");
return false;
}
dPriority = txConst.ComputePriority(dPriority, nBytes);
Expand Down

0 comments on commit cf19353

Please sign in to comment.