v29.4-roots.4 · Commit 3: [PATCH 03/37] policy: restore conservative relay and network controls
src/policy/truc_policy.h
Before: src/policy/truc_policy.h · After: src/policy/truc_policy.h
File metadata
index dbc77696c67c75bdeb89ca5bec3ec41b298b8d26..c3011dbf4de5cf7761a690b856e5ee87ab9e37d3 100644
Download original patch · Release notes
Diff rows 1–28 of 28. 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/truc_policy.h
CHANGED
|
@@ -61,6 +61,16 @@ static_assert(TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE <= DEFAULT_DESCENDANT_SIZE_L
|
|
|
61
61
|
* - debug string + nullptr if this transaction violates some TRUC rule and sibling eviction is not
|
|
62
62
|
* applicable.
|
|
63
63
|
*/
|
|
64
|
+
std::optional<std::pair<std::string, CTransactionRef>> SingleTRUCChecks(const CTransactionRef& ptx,
|
|
65
|
+
const std::string& reason_prefix, std::string& out_reason,
|
|
66
|
+
const ignore_rejects_type& ignore_rejects,
|
|
67
|
+
const CTxMemPool::setEntries& mempool_ancestors,
|
|
68
|
+
const std::set<Txid>& direct_conflicts,
|
|
69
|
+
int64_t vsize);
|
|
70
|
+
|
|
71
|
+
// Compatibility entry point for existing unit tests. Production admission
|
|
72
|
+
// supplies a policy-specific reject reason and exceptions through the overload
|
|
73
|
+
// above.
|
|
64
74
|
std::optional<std::pair<std::string, CTransactionRef>> SingleTRUCChecks(const CTransactionRef& ptx,
|
|
65
75
|
const CTxMemPool::setEntries& mempool_ancestors,
|
|
66
76
|
const std::set<Txid>& direct_conflicts,
|
|
@@ -87,6 +97,12 @@ std::optional<std::pair<std::string, CTransactionRef>> SingleTRUCChecks(const CT
|
|
|
87
97
|
*
|
|
88
98
|
* @returns debug string if an error occurs, std::nullopt otherwise.
|
|
89
99
|
* */
|
|
100
|
+
std::optional<std::string> PackageTRUCChecks(const CTransactionRef& ptx, int64_t vsize,
|
|
101
|
+
const std::string& reason_prefix, std::string& out_reason,
|
|
102
|
+
const ignore_rejects_type& ignore_rejects,
|
|
103
|
+
const Package& package,
|
|
104
|
+
const CTxMemPool::setEntries& mempool_ancestors);
|
|
105
|
+
|
|
90
106
|
std::optional<std::string> PackageTRUCChecks(const CTransactionRef& ptx, int64_t vsize,
|
|
91
107
|
const Package& package,
|
|
92
108
|
const CTxMemPool::setEntries& mempool_ancestors);
|