Skip to content
Bitcoin Roots

v30.3-roots.1 · Commit 3: [PATCH 03/68] feat(policy): preserve Roots relay and network controls on Core 30.3

src/policy/rbf.h

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

File metadata
index cc397b463dcfb72faaaed90d47a764a04c7a943c..bd913d254b77b53019845c772419e142afd28f68 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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

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