Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 4: [PATCH 04/17] feat(mining): preserve Roots priority and template policies

src/policy/policy.h

Before: src/policy/policy.h · After: src/policy/policy.h

File metadata
index dd82c9e0b49291e37500810f60e2a0f90399e7a8..e60b64d216b9de435b5f7f7c082d208434338abb 100644

Download original patch · Release notes

Diff rows 1–21 of 21. 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/policy/policy.h CHANGED
@@ -27,7 +27,12 @@ class CFeeRate;
27
  class CScript;
28
 
29
  /** Default for -blockmaxweight, which controls the range of block weights the mining code will create **/
30
- static constexpr unsigned int DEFAULT_BLOCK_MAX_WEIGHT{MAX_BLOCK_WEIGHT};
 
 
 
 
 
31
  /** Default for -blockreservedweight **/
32
  static constexpr unsigned int DEFAULT_BLOCK_RESERVED_WEIGHT{8000};
33
  /** Default sigops cost to reserve for coinbase transaction outputs when creating block templates. */
@@ -38,7 +43,7 @@ static constexpr unsigned int DEFAULT_COINBASE_OUTPUT_MAX_ADDITIONAL_SIGOPS{400}
38
  * Setting a lower value is prevented at startup. */
39
  static constexpr unsigned int MINIMUM_BLOCK_RESERVED_WEIGHT{2000};
40
  /** Default for -blockmintxfee, which sets the minimum feerate for a transaction in blocks created by mining code **/
41
- static constexpr unsigned int DEFAULT_BLOCK_MIN_TX_FEE{1};
42
  /** The maximum weight for transactions we're willing to relay/mine */
43
  static constexpr int32_t MAX_STANDARD_TX_WEIGHT{400000};
44
  /** The minimum non-witness size for transactions we're willing to relay/mine: one larger than 64 */
 
27
  class CScript;
28
 
29
  /** Default for -blockmaxweight, which controls the range of block weights the mining code will create **/
30
+ static constexpr unsigned int DEFAULT_BLOCK_MAX_WEIGHT{1'200'000};
31
+ /** Serialized bytes reserved for the header, transaction count and coinbase. */
32
+ static constexpr unsigned int DEFAULT_BLOCK_RESERVED_SIZE{1000};
33
+ /** Default serialized-byte priority area; zero disables coin-age selection. */
34
+ static constexpr unsigned int DEFAULT_BLOCK_PRIORITY_SIZE{100000};
35
+ static constexpr double MINIMUM_TX_PRIORITY{COIN * 144 / 250};
36
  /** Default for -blockreservedweight **/
37
  static constexpr unsigned int DEFAULT_BLOCK_RESERVED_WEIGHT{8000};
38
  /** Default sigops cost to reserve for coinbase transaction outputs when creating block templates. */
 
43
  * Setting a lower value is prevented at startup. */
44
  static constexpr unsigned int MINIMUM_BLOCK_RESERVED_WEIGHT{2000};
45
  /** Default for -blockmintxfee, which sets the minimum feerate for a transaction in blocks created by mining code **/
46
+ static constexpr unsigned int DEFAULT_BLOCK_MIN_TX_FEE{1000};
47
  /** The maximum weight for transactions we're willing to relay/mine */
48
  static constexpr int32_t MAX_STANDARD_TX_WEIGHT{400000};
49
  /** The minimum non-witness size for transactions we're willing to relay/mine: one larger than 64 */