Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase tx size limit up to 250kb #1457

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 3 additions & 3 deletions src/spark/sparkwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,8 +1023,8 @@ bool CSparkWallet::CreateSparkMintTransactions(

// Limit size
CTransaction txConst(tx);
if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) {
strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs");
if (GetTransactionWeight(txConst) >= MAX_NEW_TX_WEIGHT) {
strFailReason = _("Transaction is too large (size limit: 250Kb). 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 is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"));
throw std::runtime_error(_("Transaction is too large (size limit: 250Kb). Select less inputs or consolidate your UTXOs"));
}

// check fee
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4564,9 +4564,9 @@ 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) {
levonpetrosyan93 marked this conversation as resolved.
Show resolved Hide resolved
// Do not create oversized transactions (bad-txns-oversize).
strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs");
strFailReason = _("Transaction is too large (size limit: 250Kb). Select less inputs or consolidate your UTXOs");
return false;
}

Expand Down
Loading