Skip to content
Bitcoin Roots

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

src/policy/rbf.h

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

File metadata
index 3cc0fc3149f0c586cff35e99ed53ff8f28af2111..d52baad29473fba5a20a5f896321dc88eda36ac1 100644

Download original patch · Release notes

Diff rows 1–31 of 31. 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/policy/rbf.h CHANGED
@@ -6,6 +6,7 @@
6
6
  #define BITCOIN_POLICY_RBF_H
7
7
 
8
8
  #include <consensus/amount.h>
9
+ #include <policy/policy.h>
9
10
  #include <primitives/transaction.h>
10
11
  #include <threadsafety.h>
11
12
  #include <txmempool.h>
@@ -68,7 +69,8 @@ RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx);
68
69
  */
69
70
  std::optional<std::string> GetEntriesForConflicts(const CTransaction& tx, CTxMemPool& pool,
70
71
  const CTxMemPool::setEntries& iters_conflicting,
71
- CTxMemPool::setEntries& all_conflicts)
72
+ CTxMemPool::setEntries& all_conflicts,
73
+ const ignore_rejects_type& ignore_rejects=empty_ignore_rejects)
72
74
  EXCLUSIVE_LOCKS_REQUIRED(pool.cs);
73
75
 
74
76
  /** The replacement transaction may only include an unconfirmed input if that input was included in
@@ -86,11 +88,12 @@ std::optional<std::string> HasNoNewUnconfirmed(const CTransaction& tx, const CTx
86
88
  * @param[in] direct_conflicts Set of txids corresponding to the mempool conflicts
87
89
  * (candidates to be replaced).
88
90
  * @param[in] txid Transaction ID, included in the error message if violation occurs.
89
- * @returns error message if the sets intersect, std::nullopt if they are disjoint.
91
+ * @param[out] out_violates_policy Assigned to true if there are any policy-only conflicts.
92
+ * @returns error message if the sets intersect (consensus-only conflicts), std::nullopt if they are disjoint or only intersect on policy matters.
90
93
  */
91
94
  std::optional<std::string> EntriesAndTxidsDisjoint(const CTxMemPool::setEntries& ancestors,
92
- const std::set<Txid>& direct_conflicts,
93
- const uint256& txid);
95
+ const std::map<Txid, bool>& direct_conflicts,
96
+ const uint256& txid, bool* out_violates_policy);
94
97
 
95
98
  /** Check that the feerate of the replacement transaction(s) is higher than the feerate of each
96
99
  * of the transactions in iters_conflicting.