v29.4-roots.3 · Commit 3: [PATCH 03/30] 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. 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 uint256& 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 uint256& 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.
|