Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 2: [PATCH 02/17] feat(policy): preserve Roots parsing and local transaction checks

src/kernel/mempool_options.h

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

File metadata
index a18d565c65c9f8d9d49e100f4260298a7869d92f..2a96be8208bb6a7b59dbaa74e1e670585ab7fc74 100644

Download original patch · Release notes

Diff rows 1–37 of 37. 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
@@ -25,6 +25,8 @@ static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY_HOURS{336};
25
  static constexpr bool DEFAULT_PERSIST_V1_DAT{false};
26
  /** Default for -acceptnonstdtxn */
27
  static constexpr bool DEFAULT_ACCEPT_NON_STD_TXN{false};
 
 
28
 
29
  namespace kernel {
30
  /**
@@ -34,7 +36,7 @@ namespace kernel {
34
  *
35
  * Most of the time, this struct should be referenced as CTxMemPool::Options.
36
  */
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};
@@ -42,16 +44,11 @@ struct MemPoolOptions {
42
  CFeeRate incremental_relay_feerate{DEFAULT_INCREMENTAL_RELAY_FEE};
43
  /** A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) */
44
  CFeeRate min_relay_feerate{DEFAULT_MIN_RELAY_TX_FEE};
45
- CFeeRate dust_relay_feerate{DUST_RELAY_TX_FEE};
46
- /**
47
- * A data carrying output is an unspendable output containing data. The script
48
- * type is designated as TxoutType::NULL_DATA.
49
- *
50
- * Maximum size of TxoutType::NULL_DATA scripts that this node considers standard.
51
- * If nullopt, any size is nonstandard.
52
- */
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{};
 
25
  static constexpr bool DEFAULT_PERSIST_V1_DAT{false};
26
  /** Default for -acceptnonstdtxn */
27
  static constexpr bool DEFAULT_ACCEPT_NON_STD_TXN{false};
28
+ /** Default for -acceptnonstddatacarrier */
29
+ static constexpr bool DEFAULT_ACCEPT_NON_STD_DATACARRIER{false};
30
 
31
  namespace kernel {
32
  /**
 
36
  *
37
  * Most of the time, this struct should be referenced as CTxMemPool::Options.
38
  */
39
+ struct MemPoolOptions : StandardnessOptions {
40
  /* The ratio used to determine how often sanity checks will run. */
41
  int check_ratio{0};
42
  int64_t max_size_bytes{DEFAULT_MAX_MEMPOOL_SIZE_MB * 1'000'000};
 
44
  CFeeRate incremental_relay_feerate{DEFAULT_INCREMENTAL_RELAY_FEE};
45
  /** A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) */
46
  CFeeRate min_relay_feerate{DEFAULT_MIN_RELAY_TX_FEE};
47
+ // Local policy controls; graph accounting and dynamic dust remain deferred.
48
+ uint64_t minrelaycoinblocks{0};
49
+ int minrelaymaturity{0};
50
+ bool datacarrier_fullcount{DEFAULT_DATACARRIER_FULLCOUNT};
51
+ bool accept_non_std_datacarrier{false};
 
 
 
 
 
52
  bool require_standard{true};
53
  bool persist_v1_dat{DEFAULT_PERSIST_V1_DAT};
54
  MemPoolLimits limits{};