Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 5: [PATCH 05/17] feat(net): preserve Roots peer controls and health view on v31

src/net_processing.h

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

File metadata
index 36ae021f679dc6d94a5c15aa2bc39c1c2a90172e..12a1840086f07b8e18e9d92bce23613d0fe05b1d 100644

Download original patch · Release notes

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

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/net_processing.h CHANGED
@@ -41,7 +41,10 @@ class Warnings;
41
41
  static constexpr bool DEFAULT_TXRECONCILIATION_ENABLE{false};
42
42
  /** Default number of non-mempool transactions to keep around for block reconstruction. Includes
43
43
  orphan, replaced, and rejected transactions. */
44
- static const uint32_t DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN{100};
44
+ static const uint32_t DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN{32768};
45
+ static constexpr size_t DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN_SIZE{10000000};
46
+ static constexpr size_t BLOCK_RECONSTRUCTION_EXTRA_TXN_PER_TXN_SIZE_LIMIT{100000};
47
+ static constexpr bool DEFAULT_FEEFILTER{true};
45
48
  static const bool DEFAULT_PEERBLOOMFILTERS = false;
46
49
  static const bool DEFAULT_PEERBLOCKFILTERS = false;
47
50
  /** Maximum number of outstanding CMPCTBLOCK requests for the same block. */
@@ -51,6 +54,8 @@ static const unsigned int MAX_CMPCTBLOCKS_INFLIGHT_PER_BLOCK = 3;
51
54
  static const unsigned int MAX_HEADERS_RESULTS = 2000;
52
55
 
53
56
  struct CNodeStateStats {
57
+ std::chrono::seconds m_last_block_announcement{0};
58
+ int m_misbehavior_score{0}; // Deprecated: 0 or 100 when discouragement is pending.
54
59
  int nSyncHeight = -1;
55
60
  int nCommonHeight = -1;
56
61
  int m_starting_height = -1;
@@ -84,6 +89,8 @@ public:
84
89
  //! Number of non-mempool transactions to keep around for block reconstruction. Includes
85
90
  //! orphan, replaced, and rejected transactions.
86
91
  uint32_t max_extra_txs{DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN};
92
+ size_t max_extra_txs_size{DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN_SIZE};
93
+ bool send_feefilter{DEFAULT_FEEFILTER};
87
94
  //! Whether all P2P messages are captured to disk
88
95
  bool capture_messages{false};
89
96
  //! Whether or not the internal RNG behaves deterministically (this is