From 1450a725a49058b9c4db0494ee9b52d9b3560a86 Mon Sep 17 00:00:00 2001 From: levonpetrosyan93 Date: Sun, 9 Jun 2024 18:37:08 +0400 Subject: [PATCH] Increase tx size limit up to 259kb --- src/policy/policy.h | 2 +- src/spark/sparkwallet.cpp | 2 +- src/wallet/wallet.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/policy/policy.h b/src/policy/policy.h index 4865201be3..4f211fffbe 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -25,7 +25,7 @@ static const unsigned int DEFAULT_BLOCK_MIN_TX_FEE = 1000; /** The maximum weight for transactions we're willing to relay/mine */ static const unsigned int MAX_STANDARD_TX_WEIGHT = 400000; /** The new maximum weight for transactions we're willing to relay/mine */ -static const unsigned int MAX_NEW_TX_WEIGHT = 520000; +static const unsigned int MAX_NEW_TX_WEIGHT = 1000000; /** Maximum number of signature check operations in an IsStandard() P2SH script */ static const unsigned int MAX_P2SH_SIGOPS = 15; /** The maximum number of sigops we're willing to relay/mine in a single tx */ diff --git a/src/spark/sparkwallet.cpp b/src/spark/sparkwallet.cpp index 0852256861..c492dc58e9 100644 --- a/src/spark/sparkwallet.cpp +++ b/src/spark/sparkwallet.cpp @@ -1023,7 +1023,7 @@ bool CSparkWallet::CreateSparkMintTransactions( // Limit size CTransaction txConst(tx); - if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) { + if (GetTransactionWeight(txConst) >= MAX_NEW_TX_WEIGHT) { strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false; } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 0aa4b89c96..701e468846 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4564,7 +4564,7 @@ bool CWallet::CreateTransaction(const std::vector& vecSend, CWalletT nBytes += GetSizeOfCompactSize(nExtraPayloadSize) + nExtraPayloadSize; } - if (GetTransactionWeight(txNew) >= MAX_STANDARD_TX_WEIGHT) { + if (GetTransactionWeight(txNew) >= MAX_NEW_TX_WEIGHT) { // Do not create oversized transactions (bad-txns-oversize). strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false;