Bitcoin ABC  0.26.3
P2P Digital Currency
mempool.h
Go to the documentation of this file.
1 // Copyright (c) 2020 The Bitcoin developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 #ifndef BITCOIN_POLICY_MEMPOOL_H
5 #define BITCOIN_POLICY_MEMPOOL_H
6 
7 #include <policy/packages.h>
8 
9 #include <cstdint>
10 
11 class CBlockIndex;
12 namespace Consensus {
13 struct Params;
14 }
15 
17 static constexpr unsigned int DEFAULT_ANCESTOR_LIMIT = 50;
22 static constexpr unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101;
24 static constexpr unsigned int DEFAULT_DESCENDANT_LIMIT = 50;
29 static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101;
30 
31 // If a package is submitted, it must be within the mempool's
32 // ancestor/descendant limits. Since a submitted package must be
33 // child-with-unconfirmed-parents (all of the transactions are an ancestor of
34 // the child), package limits are ultimately bounded by mempool package limits.
35 // Ensure that the defaults reflect this constraint.
40 
41 #endif // BITCOIN_POLICY_MEMPOOL_H
const CChainParams & Params()
Return the currently selected parameters.
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:26
static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT
Default for -limitdescendantsize, maximum kilobytes of in-mempool descendants.
Definition: mempool.h:29
static constexpr unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT
Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors.
Definition: mempool.h:22
static constexpr unsigned int DEFAULT_DESCENDANT_LIMIT
Default for -limitdescendantcount, max number of in-mempool descendants.
Definition: mempool.h:24
static constexpr unsigned int DEFAULT_ANCESTOR_LIMIT
Default for -limitancestorcount, max number of in-mempool ancestors.
Definition: mempool.h:17
static constexpr uint32_t MAX_PACKAGE_COUNT
Default maximum number of transactions in a package.
Definition: packages.h:15
static constexpr uint32_t MAX_PACKAGE_SIZE
Default maximum total size of transactions in a package in KB.
Definition: packages.h:17