Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.cpp
Show First 20 Lines • Show All 306 Lines • ▼ Show 20 Lines | public: | ||||
// return other non-mempool failures that Chain clients do not need | // return other non-mempool failures that Chain clients do not need | ||||
// to know about. | // to know about. | ||||
return err == TransactionError::OK; | return err == TransactionError::OK; | ||||
} | } | ||||
void getTransactionAncestry(const TxId &txid, size_t &ancestors, | void getTransactionAncestry(const TxId &txid, size_t &ancestors, | ||||
size_t &descendants) override { | size_t &descendants) override { | ||||
::g_mempool.GetTransactionAncestry(txid, ancestors, descendants); | ::g_mempool.GetTransactionAncestry(txid, ancestors, descendants); | ||||
} | } | ||||
void getPackageLimits(size_t &limit_ancestor_count, | |||||
size_t &limit_descendant_count) override { | |||||
limit_ancestor_count = size_t( | |||||
std::max<int64_t>(1, gArgs.GetArg("-limitancestorcount", | |||||
DEFAULT_ANCESTOR_LIMIT))); | |||||
limit_descendant_count = size_t( | |||||
std::max<int64_t>(1, gArgs.GetArg("-limitdescendantcount", | |||||
DEFAULT_DESCENDANT_LIMIT))); | |||||
} | |||||
bool checkChainLimits(const CTransactionRef &tx) override { | bool checkChainLimits(const CTransactionRef &tx) override { | ||||
LockPoints lp; | LockPoints lp; | ||||
CTxMemPoolEntry entry(tx, Amount(), 0, 0, false, 0, lp); | CTxMemPoolEntry entry(tx, Amount(), 0, 0, false, 0, lp); | ||||
CTxMemPool::setEntries ancestors; | CTxMemPool::setEntries ancestors; | ||||
auto limit_ancestor_count = | auto limit_ancestor_count = | ||||
gArgs.GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT); | gArgs.GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT); | ||||
auto limit_ancestor_size = | auto limit_ancestor_size = | ||||
gArgs.GetArg("-limitancestorsize", | gArgs.GetArg("-limitancestorsize", | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |