Bitcoin Core 28.99.0
P2P Digital Currency
mempool_options.h
Go to the documentation of this file.
1// Copyright (c) 2022 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
8
9#include <policy/feerate.h>
10#include <policy/policy.h>
11
12#include <chrono>
13#include <cstdint>
14#include <optional>
15
17
19static constexpr unsigned int DEFAULT_MAX_MEMPOOL_SIZE_MB{300};
21static constexpr unsigned int DEFAULT_BLOCKSONLY_MAX_MEMPOOL_SIZE_MB{5};
23static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY_HOURS{336};
25static constexpr bool DEFAULT_PERSIST_V1_DAT{false};
27static constexpr bool DEFAULT_ACCEPT_NON_STD_TXN{false};
28
29namespace kernel {
38 /* The ratio used to determine how often sanity checks will run. */
41 std::chrono::seconds expiry{std::chrono::hours{DEFAULT_MEMPOOL_EXPIRY_HOURS}};
53 std::optional<unsigned> max_datacarrier_bytes{DEFAULT_ACCEPT_DATACARRIER ? std::optional{MAX_OP_RETURN_RELAY} : std::nullopt};
55 bool require_standard{true};
58
60};
61} // namespace kernel
62
63#endif // BITCOIN_KERNEL_MEMPOOL_OPTIONS_H
Fee rate in satoshis per kilovirtualbyte: CAmount / kvB.
Definition: feerate.h:33
static constexpr unsigned int DEFAULT_MAX_MEMPOOL_SIZE_MB
Default for -maxmempool, maximum megabytes of mempool memory usage.
static constexpr bool DEFAULT_ACCEPT_NON_STD_TXN
Default for -acceptnonstdtxn.
static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY_HOURS
Default for -mempoolexpiry, expiration time for mempool transactions in hours.
static constexpr unsigned int DEFAULT_BLOCKSONLY_MAX_MEMPOOL_SIZE_MB
Default for -maxmempool when blocksonly is set.
static constexpr bool DEFAULT_PERSIST_V1_DAT
Whether to fall back to legacy V1 serialization when writing mempool.dat.
static const unsigned int MAX_OP_RETURN_RELAY
Default setting for -datacarriersize.
Definition: policy.h:72
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:35
static constexpr bool DEFAULT_PERMIT_BAREMULTISIG
Default for -permitbaremultisig.
Definition: policy.h:39
static constexpr unsigned int DUST_RELAY_TX_FEE
Min feerate for defining dust.
Definition: policy.h:55
static const bool DEFAULT_ACCEPT_DATACARRIER
Default for -datacarrier.
Definition: policy.h:67
static constexpr unsigned int DEFAULT_MIN_RELAY_TX_FEE
Default for -minrelaytxfee, minimum relay fee for transactions.
Definition: policy.h:57
Options struct containing limit options for a CTxMemPool.
Options struct containing options for constructing a CTxMemPool.
std::optional< unsigned > max_datacarrier_bytes
A data carrying output is an unspendable output containing data.
ValidationSignals * signals
CFeeRate incremental_relay_feerate
CFeeRate min_relay_feerate
A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation)
std::chrono::seconds expiry