Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
kernel
mempool_options.h
Go to the documentation of this file.
1
// Copyright (c) 2022-present The Bitcoin Core 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_KERNEL_MEMPOOL_OPTIONS_H
5
#define BITCOIN_KERNEL_MEMPOOL_OPTIONS_H
6
7
#include <
kernel/mempool_limits.h
>
8
9
#include <
policy/feerate.h
>
10
#include <
policy/policy.h
>
11
12
#include <chrono>
13
#include <cstdint>
14
#include <optional>
15
16
class
ValidationSignals
;
17
19
static
constexpr
unsigned
int
DEFAULT_MAX_MEMPOOL_SIZE_MB
{300};
21
static
constexpr
unsigned
int
DEFAULT_BLOCKSONLY_MAX_MEMPOOL_SIZE_MB
{5};
23
static
constexpr
unsigned
int
DEFAULT_MEMPOOL_EXPIRY_HOURS
{336};
25
static
constexpr
bool
DEFAULT_PERSIST_V1_DAT
{
false
};
27
static
constexpr
bool
DEFAULT_ACCEPT_NON_STD_TXN
{
false
};
28
29
namespace
kernel
{
37
struct
MemPoolOptions
{
38
/* The ratio used to determine how often sanity checks will run. */
39
int
check_ratio
{0};
40
int64_t
max_size_bytes
{
DEFAULT_MAX_MEMPOOL_SIZE_MB
* 1'000'000};
41
std::chrono::seconds
expiry
{std::chrono::hours{
DEFAULT_MEMPOOL_EXPIRY_HOURS
}};
42
CFeeRate
incremental_relay_feerate
{
DEFAULT_INCREMENTAL_RELAY_FEE
};
44
CFeeRate
min_relay_feerate
{
DEFAULT_MIN_RELAY_TX_FEE
};
45
CFeeRate
dust_relay_feerate
{
DUST_RELAY_TX_FEE
};
53
std::optional<unsigned>
max_datacarrier_bytes
{
DEFAULT_ACCEPT_DATACARRIER
? std::optional{
MAX_OP_RETURN_RELAY
} : std::nullopt};
54
bool
permit_bare_multisig
{
DEFAULT_PERMIT_BAREMULTISIG
};
55
bool
require_standard
{
true
};
56
bool
persist_v1_dat
{
DEFAULT_PERSIST_V1_DAT
};
57
MemPoolLimits
limits
{};
58
59
ValidationSignals
*
signals
{
nullptr
};
60
};
61
}
// namespace kernel
62
63
#endif
// BITCOIN_KERNEL_MEMPOOL_OPTIONS_H
CFeeRate
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
Definition
feerate.h:32
ValidationSignals
Definition
validationinterface.h:166
feerate.h
mempool_limits.h
DEFAULT_MAX_MEMPOOL_SIZE_MB
static constexpr unsigned int DEFAULT_MAX_MEMPOOL_SIZE_MB
Default for -maxmempool, maximum megabytes of mempool memory usage.
Definition
mempool_options.h:19
DEFAULT_ACCEPT_NON_STD_TXN
static constexpr bool DEFAULT_ACCEPT_NON_STD_TXN
Default for -acceptnonstdtxn.
Definition
mempool_options.h:27
DEFAULT_MEMPOOL_EXPIRY_HOURS
static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY_HOURS
Default for -mempoolexpiry, expiration time for mempool transactions in hours.
Definition
mempool_options.h:23
DEFAULT_BLOCKSONLY_MAX_MEMPOOL_SIZE_MB
static constexpr unsigned int DEFAULT_BLOCKSONLY_MAX_MEMPOOL_SIZE_MB
Default for -maxmempool when blocksonly is set.
Definition
mempool_options.h:21
DEFAULT_PERSIST_V1_DAT
static constexpr bool DEFAULT_PERSIST_V1_DAT
Whether to fall back to legacy V1 serialization when writing mempool.dat.
Definition
mempool_options.h:25
kernel
Definition
coinstatsindex.h:21
policy.h
MAX_OP_RETURN_RELAY
static const unsigned int MAX_OP_RETURN_RELAY
Default setting for -datacarriersize in vbytes.
Definition
policy.h:83
DEFAULT_INCREMENTAL_RELAY_FEE
static constexpr unsigned int DEFAULT_INCREMENTAL_RELAY_FEE
Default for -incrementalrelayfee, which sets the minimum feerate increase for mempool limiting or rep...
Definition
policy.h:47
DEFAULT_PERMIT_BAREMULTISIG
static constexpr bool DEFAULT_PERMIT_BAREMULTISIG
Default for -permitbaremultisig.
Definition
policy.h:51
DUST_RELAY_TX_FEE
static constexpr unsigned int DUST_RELAY_TX_FEE
Min feerate for defining dust.
Definition
policy.h:67
DEFAULT_ACCEPT_DATACARRIER
static const bool DEFAULT_ACCEPT_DATACARRIER
Default for -datacarrier.
Definition
policy.h:79
DEFAULT_MIN_RELAY_TX_FEE
static constexpr unsigned int DEFAULT_MIN_RELAY_TX_FEE
Default for -minrelaytxfee, minimum relay fee for transactions.
Definition
policy.h:69
kernel::MemPoolLimits
Options struct containing limit options for a CTxMemPool.
Definition
mempool_limits.h:18
kernel::MemPoolOptions
Options struct containing options for constructing a CTxMemPool.
Definition
mempool_options.h:37
kernel::MemPoolOptions::persist_v1_dat
bool persist_v1_dat
Definition
mempool_options.h:56
kernel::MemPoolOptions::check_ratio
int check_ratio
Definition
mempool_options.h:39
kernel::MemPoolOptions::max_size_bytes
int64_t max_size_bytes
Definition
mempool_options.h:40
kernel::MemPoolOptions::require_standard
bool require_standard
Definition
mempool_options.h:55
kernel::MemPoolOptions::max_datacarrier_bytes
std::optional< unsigned > max_datacarrier_bytes
A data carrying output is an unspendable output containing data.
Definition
mempool_options.h:53
kernel::MemPoolOptions::limits
MemPoolLimits limits
Definition
mempool_options.h:57
kernel::MemPoolOptions::dust_relay_feerate
CFeeRate dust_relay_feerate
Definition
mempool_options.h:45
kernel::MemPoolOptions::signals
ValidationSignals * signals
Definition
mempool_options.h:59
kernel::MemPoolOptions::incremental_relay_feerate
CFeeRate incremental_relay_feerate
Definition
mempool_options.h:42
kernel::MemPoolOptions::permit_bare_multisig
bool permit_bare_multisig
Definition
mempool_options.h:54
kernel::MemPoolOptions::min_relay_feerate
CFeeRate min_relay_feerate
A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation).
Definition
mempool_options.h:44
kernel::MemPoolOptions::expiry
std::chrono::seconds expiry
Definition
mempool_options.h:41
Generated on
for Bitcoin Core by
1.17.0