Skip to content

Commit

Permalink
Increase tx size limit up to 259kb
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 committed Jun 9, 2024
1 parent cf19353 commit 1450a72
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/policy/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/spark/sparkwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4564,7 +4564,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& 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;
Expand Down

0 comments on commit 1450a72

Please sign in to comment.