MCPcopy Create free account
hub / github.com/ElementsProject/elements / checkChainLimits

Method checkChainLimits

src/node/interfaces.cpp:610–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608 limit_descendant_count = gArgs.GetIntArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT);
609 }
610 bool checkChainLimits(const CTransactionRef& tx) override
611 {
612 if (!m_node.mempool) return true;
613 LockPoints lp;
614 std::set<std::pair<uint256, COutPoint>> setPeginsSpent;
615 CTxMemPoolEntry entry(tx, 0, 0, 0, false, 0, lp, setPeginsSpent);
616 CTxMemPool::setEntries ancestors;
617 auto limit_ancestor_count = gArgs.GetIntArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT);
618 auto limit_ancestor_size = gArgs.GetIntArg("-limitancestorsize", DEFAULT_ANCESTOR_SIZE_LIMIT) * 1000;
619 auto limit_descendant_count = gArgs.GetIntArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT);
620 auto limit_descendant_size = gArgs.GetIntArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000;
621 std::string unused_error_string;
622 LOCK(m_node.mempool->cs);
623 return m_node.mempool->CalculateMemPoolAncestors(
624 entry, ancestors, limit_ancestor_count, limit_ancestor_size,
625 limit_descendant_count, limit_descendant_size, unused_error_string);
626 }
627 CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc) override
628 {
629 if (!m_node.fee_estimator) return {};

Callers 1

spend.cppFile · 0.80

Calls 2

GetIntArgMethod · 0.80

Tested by

no test coverage detected