|
|
|
@ -3127,16 +3127,7 @@ bool CWallet::CreateTransaction(interfaces::Chain::Lock& locked_chain, const std
|
|
|
|
|
|
|
|
|
|
if (gArgs.GetBoolArg("-walletrejectlongchains", DEFAULT_WALLET_REJECT_LONG_CHAINS)) {
|
|
|
|
|
// Lastly, ensure this tx will pass the mempool's chain limits
|
|
|
|
|
LockPoints lp;
|
|
|
|
|
CTxMemPoolEntry entry(tx, 0, 0, 0, false, 0, lp);
|
|
|
|
|
CTxMemPool::setEntries setAncestors;
|
|
|
|
|
size_t nLimitAncestors = gArgs.GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT);
|
|
|
|
|
size_t nLimitAncestorSize = gArgs.GetArg("-limitancestorsize", DEFAULT_ANCESTOR_SIZE_LIMIT)*1000;
|
|
|
|
|
size_t nLimitDescendants = gArgs.GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT);
|
|
|
|
|
size_t nLimitDescendantSize = gArgs.GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT)*1000;
|
|
|
|
|
std::string errString;
|
|
|
|
|
LOCK(::mempool.cs);
|
|
|
|
|
if (!::mempool.CalculateMemPoolAncestors(entry, setAncestors, nLimitAncestors, nLimitAncestorSize, nLimitDescendants, nLimitDescendantSize, errString)) {
|
|
|
|
|
if (!chain().checkChainLimits(tx)) {
|
|
|
|
|
strFailReason = _("Transaction has too long of a mempool chain");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|