Skip to content
Bitcoin Roots

v29.4-roots.3 · Commit 3: [PATCH 03/30] policy: restore conservative relay and network controls

src/net_permissions.h

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

File metadata
index 33babd62046e37e257d6fdfe738f92616afd8947..0bce0a6b602fdfeb47147dcccb2671d82a878af6 100644

Download original patch · Release notes

Diff rows 1–20 of 20. 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_permissions.h CHANGED
@@ -40,11 +40,19 @@ enum class NetPermissionFlags : uint32_t {
40
40
  // Can request addrs without hitting a privacy-preserving cache, and send us
41
41
  // unlimited amounts of addrs.
42
42
  Addr = (1U << 7),
43
+ // Try harder to evict an existing connection if needed to open
44
+ // an inbound slot from this peer
45
+ ForceInbound = (1U << 10) | NoBan,
46
+
47
+ // Can query compact filters even if -peerblockfilters is false
48
+ BlockFilters = (1U << 8),
49
+ // Used to avoid an error when All is used to set BlockFilters
50
+ BlockFilters_Explicit = BlockFilters | (1U << 9),
43
51
 
44
52
  // True if the user did not specifically set fine-grained permissions with
45
53
  // the -whitebind or -whitelist configuration options.
46
54
  Implicit = (1U << 31),
47
- All = BloomFilter | ForceRelay | Relay | NoBan | Mempool | Download | Addr,
55
+ All = BloomFilter | ForceRelay | Relay | NoBan | Mempool | Download | Addr | BlockFilters | ForceInbound,
48
56
  };
49
57
  static inline constexpr NetPermissionFlags operator|(NetPermissionFlags a, NetPermissionFlags b)
50
58
  {