Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 3: [PATCH 03/17] feat(policy): preserve cluster accounting and repair dynamic dust

src/kernel/mempool_options.h

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

File metadata
index 2a96be8208bb6a7b59dbaa74e1e670585ab7fc74..ed31519138318e709001f72867b048c397d73256 100644

Download original patch · Release notes

Diff rows 1–25 of 25. 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
@@ -28,6 +28,9 @@ 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
  /**
33
  * Options struct containing options for constructing a CTxMemPool. Default
@@ -44,7 +47,15 @@ struct MemPoolOptions : StandardnessOptions {
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};
 
28
  /** Default for -acceptnonstddatacarrier */
29
  static constexpr bool DEFAULT_ACCEPT_NON_STD_DATACARRIER{false};
30
 
31
+ enum class RBFPolicy { Never, OptIn, Always };
32
+ enum class TRUCPolicy { Reject, Accept, Enforce };
33
+
34
  namespace kernel {
35
  /**
36
  * Options struct containing options for constructing a CTxMemPool. Default
 
47
  CFeeRate incremental_relay_feerate{DEFAULT_INCREMENTAL_RELAY_FEE};
48
  /** A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) */
49
  CFeeRate min_relay_feerate{DEFAULT_MIN_RELAY_TX_FEE};
50
+ // Local policy controls. Dynamic dust publication is node-owned.
51
+ unsigned int weight_per_data_byte{WITNESS_SCALE_FACTOR};
52
+ bool subdustfeepenalty{DEFAULT_SUBDUSTFEEPENALTY};
53
+ RBFPolicy rbf_policy{RBFPolicy::Always};
54
+ TRUCPolicy truc_policy{TRUCPolicy::Enforce};
55
+ bool reject_spk_reuse{false};
56
+ /** Negative: estimator target blocks; positive: native mempool position in kvB; zero: off. */
57
+ int32_t dust_relay_target{0};
58
+ int dust_relay_multiplier{3'000};
59
  uint64_t minrelaycoinblocks{0};
60
  int minrelaymaturity{0};
61
  bool datacarrier_fullcount{DEFAULT_DATACARRIER_FULLCOUNT};