/
githubmirror
/
bitcoin
Обзор
Документация
Войти
/
githubmirror
/
bitcoin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/kernel/mempool_limits.h
39 строк
1 KB
MarcoFalke
scripted-diff: [doc] Unify stale copyright headers
17 дек 2025, 00:21
17 дек 2025, 00:21
fa5f297
Код
Авторство
О чём код?
// Copyright (c) 2022-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_KERNEL_MEMPOOL_LIMITS_H #define BITCOIN_KERNEL_MEMPOOL_LIMITS_H #include <policy/policy.h> #include <cstdint> namespace kernel { /** * Options struct containing limit options for a CTxMemPool. Default constructor * populates the struct with sane default values which can be modified. * * Most of the time, this struct should be referenced as CTxMemPool::Limits. */ struct MemPoolLimits { //! The maximum number of transactions in a cluster unsigned cluster_count{DEFAULT_CLUSTER_LIMIT}; //! The maximum allowed size in virtual bytes of a cluster. int64_t cluster_size_vbytes{DEFAULT_CLUSTER_SIZE_LIMIT_KVB * 1'000}; //! The maximum allowed number of transactions in a package including the entry and its ancestors. int64_t ancestor_count{DEFAULT_ANCESTOR_LIMIT}; //! The maximum allowed number of transactions in a package including the entry and its descendants. int64_t descendant_count{DEFAULT_DESCENDANT_LIMIT}; /** * @return MemPoolLimits with all the limits set to the maximum */ static constexpr MemPoolLimits NoLimits() { int64_t no_limit{std::numeric_limits<int64_t>::max()}; return {std::numeric_limits<unsigned>::max(), no_limit, no_limit, no_limit}; } }; } // namespace kernel #endif // BITCOIN_KERNEL_MEMPOOL_LIMITS_H