Raise 100kB transaction size limit from Sapling activation

Closes #2864.
This commit is contained in:
Jack Grigg
2018-04-26 14:18:36 +01:00
parent d97bfb766b
commit 15ec5525e3
5 changed files with 81 additions and 15 deletions

View File

@@ -2589,6 +2589,11 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
txNew.nExpiryHeight = nextBlockHeight + expiryDelta;
}
}
unsigned int max_tx_size = MAX_TX_SIZE;
if (!NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) {
max_tx_size = MAX_TX_SIZE_BEFORE_SAPLING;
}
// Discourage fee sniping.
//
@@ -2828,7 +2833,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
*static_cast<CTransaction*>(&wtxNew) = CTransaction(txNew);
// Limit size
if (nBytes >= MAX_TX_SIZE)
if (nBytes >= max_tx_size)
{
strFailReason = _("Transaction too large");
return false;