Skip to content
Bitcoin Roots

v29.4-roots.1 · Commit 7: [PATCH 07/13] release: establish Roots maintenance and assurance

src/kernel/mempool_options.h

Before: src/kernel/mempool_options.h · After: src/kernel/mempool_options.h

File metadata
index a23ec8a0ed588873513b63b62a3409514dfaa3af..5dd062d234827e22c3c57f6bec48bc57e4c717fc 100644

Download original patch · Release notes

Diff rows 1–61 of 61. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

src/kernel/mempool_options.h CHANGED
@@ -11,7 +11,6 @@
11
 
12
  #include <chrono>
13
  #include <cstdint>
14
- #include <optional>
15
 
16
  class CBlockPolicyEstimator;
17
  class CScheduler;
@@ -40,9 +39,6 @@ static constexpr bool DEFAULT_PERSIST_V1_DAT{false};
40
  static constexpr bool DEFAULT_ACCEPT_NON_STD_DATACARRIER{false};
41
  /** Default for -acceptnonstdtxn */
42
  static constexpr bool DEFAULT_ACCEPT_NON_STD_TXN{false};
43
- /** Default for -acceptunknownwitness */
44
- static constexpr bool DEFAULT_ACCEPTUNKNOWNWITNESS{true};
45
-
46
  namespace kernel {
47
  /**
48
  * Options struct containing options for constructing a CTxMemPool. Default
@@ -51,7 +47,7 @@ namespace kernel {
51
  *
52
  * Most of the time, this struct should be referenced as CTxMemPool::Options.
53
  */
54
- struct MemPoolOptions {
55
  /* Used to estimate appropriate transaction fees. */
56
  CBlockPolicyEstimator* estimator{nullptr};
57
  CScheduler* scheduler{nullptr};
@@ -64,37 +60,17 @@ struct MemPoolOptions {
64
  CFeeRate incremental_relay_feerate{CORE_INCREMENTAL_RELAY_FEE};
65
  /** A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) */
66
  CFeeRate min_relay_feerate{DEFAULT_MIN_RELAY_TX_FEE};
67
- CFeeRate dust_relay_feerate{DUST_RELAY_TX_FEE};
68
  CFeeRate dust_relay_feerate_floor{DUST_RELAY_TX_FEE};
69
  /** Negative for a target number of blocks, positive for target kB into current mempool. */
70
  int32_t dust_relay_target{0};
71
  /** Multiplier for dustdynamic assignments, in thousandths. */
72
  int dust_relay_multiplier{DEFAULT_DUST_RELAY_MULTIPLIER};
73
- unsigned int maxtxlegacysigops{MAX_TX_LEGACY_SIGOPS};
74
- /**
75
- * A data carrying output is an unspendable output containing data. The script
76
- * type is designated as TxoutType::NULL_DATA.
77
- *
78
- * Maximum size of TxoutType::NULL_DATA scripts that this node considers standard.
79
- * If nullopt, any size is nonstandard.
80
- */
81
- std::optional<unsigned> max_datacarrier_bytes{DEFAULT_ACCEPT_DATACARRIER ? std::optional{MAX_OP_RETURN_RELAY} : std::nullopt};
82
  bool datacarrier_fullcount{DEFAULT_DATACARRIER_FULLCOUNT};
83
- bool permitbaredatacarrier{DEFAULT_PERMITBAREDATACARRIER};
84
- bool permitbareanchor{DEFAULT_PERMITBAREANCHOR};
85
- bool permit_bare_pubkey{DEFAULT_PERMIT_BAREPUBKEY};
86
- bool permit_bare_multisig{DEFAULT_PERMIT_BAREMULTISIG};
87
- bool reject_parasites{DEFAULT_REJECT_PARASITES};
88
- bool reject_tokens{DEFAULT_REJECT_TOKENS};
89
  bool subdustfeepenalty{DEFAULT_SUBDUSTFEEPENALTY};
90
  bool accept_non_std_datacarrier{DEFAULT_ACCEPT_NON_STD_DATACARRIER};
91
  bool require_standard{true};
92
- bool acceptunknownwitness{DEFAULT_ACCEPTUNKNOWNWITNESS};
93
  RBFPolicy rbf_policy{DEFAULT_MEMPOOL_RBF_POLICY};
94
  TRUCPolicy truc_policy{DEFAULT_MEMPOOL_TRUC_POLICY};
95
- bool permitephemeral_anchor{DEFAULT_PERMITEPHEMERAL_ANCHOR};
96
- bool permitephemeral_send{DEFAULT_PERMITEPHEMERAL_SEND};
97
- bool permitephemeral_dust{DEFAULT_PERMITEPHEMERAL_DUST};
98
  bool persist_v1_dat{DEFAULT_PERSIST_V1_DAT};
99
  MemPoolLimits limits{};
100
 
 
11
 
12
  #include <chrono>
13
  #include <cstdint>
 
14
 
15
  class CBlockPolicyEstimator;
16
  class CScheduler;
 
39
  static constexpr bool DEFAULT_ACCEPT_NON_STD_DATACARRIER{false};
40
  /** Default for -acceptnonstdtxn */
41
  static constexpr bool DEFAULT_ACCEPT_NON_STD_TXN{false};
 
 
 
42
  namespace kernel {
43
  /**
44
  * Options struct containing options for constructing a CTxMemPool. Default
 
47
  *
48
  * Most of the time, this struct should be referenced as CTxMemPool::Options.
49
  */
50
+ struct MemPoolOptions : StandardnessOptions {
51
  /* Used to estimate appropriate transaction fees. */
52
  CBlockPolicyEstimator* estimator{nullptr};
53
  CScheduler* scheduler{nullptr};
 
60
  CFeeRate incremental_relay_feerate{CORE_INCREMENTAL_RELAY_FEE};
61
  /** A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) */
62
  CFeeRate min_relay_feerate{DEFAULT_MIN_RELAY_TX_FEE};
 
63
  CFeeRate dust_relay_feerate_floor{DUST_RELAY_TX_FEE};
64
  /** Negative for a target number of blocks, positive for target kB into current mempool. */
65
  int32_t dust_relay_target{0};
66
  /** Multiplier for dustdynamic assignments, in thousandths. */
67
  int dust_relay_multiplier{DEFAULT_DUST_RELAY_MULTIPLIER};
 
 
 
 
 
 
 
 
 
68
  bool datacarrier_fullcount{DEFAULT_DATACARRIER_FULLCOUNT};
 
 
 
 
 
 
69
  bool subdustfeepenalty{DEFAULT_SUBDUSTFEEPENALTY};
70
  bool accept_non_std_datacarrier{DEFAULT_ACCEPT_NON_STD_DATACARRIER};
71
  bool require_standard{true};
 
72
  RBFPolicy rbf_policy{DEFAULT_MEMPOOL_RBF_POLICY};
73
  TRUCPolicy truc_policy{DEFAULT_MEMPOOL_TRUC_POLICY};
 
 
 
74
  bool persist_v1_dat{DEFAULT_PERSIST_V1_DAT};
75
  MemPoolLimits limits{};
76