v30.3-roots.1 · Commit 3: [PATCH 03/68] feat(policy): preserve Roots relay and network controls on Core 30.3
src/policy/truc_policy.h
Before: src/policy/truc_policy.h · After: src/policy/truc_policy.h
File metadata
index acd8ae56b1c742c18c9a18ca5aa440cd5ec992f3..b475406fd55d4e072afb9740290a7549acbfd89b 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
|
@@ -63,6 +63,16 @@ static_assert(TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE <= DEFAULT_DESCENDANT_SIZE_L
|
|
|
63
63
|
* - debug string + nullptr if this transaction violates some TRUC rule and sibling eviction is not
|
|
64
64
|
* applicable.
|
|
65
65
|
*/
|
|
66
|
+
std::optional<std::pair<std::string, CTransactionRef>> SingleTRUCChecks(const CTransactionRef& ptx,
|
|
67
|
+
const std::string& reason_prefix, std::string& out_reason,
|
|
68
|
+
const ignore_rejects_type& ignore_rejects,
|
|
69
|
+
const CTxMemPool::setEntries& mempool_ancestors,
|
|
70
|
+
const std::set<Txid>& direct_conflicts,
|
|
71
|
+
int64_t vsize);
|
|
72
|
+
|
|
73
|
+
// Compatibility entry point for existing unit tests. Production admission
|
|
74
|
+
// supplies a policy-specific reject reason and exceptions through the overload
|
|
75
|
+
// above.
|
|
66
76
|
std::optional<std::pair<std::string, CTransactionRef>> SingleTRUCChecks(const CTransactionRef& ptx,
|
|
67
77
|
const CTxMemPool::setEntries& mempool_ancestors,
|
|
68
78
|
const std::set<Txid>& direct_conflicts,
|
|
@@ -89,6 +99,12 @@ std::optional<std::pair<std::string, CTransactionRef>> SingleTRUCChecks(const CT
|
|
|
89
99
|
*
|
|
90
100
|
* @returns debug string if an error occurs, std::nullopt otherwise.
|
|
91
101
|
* */
|
|
102
|
+
std::optional<std::string> PackageTRUCChecks(const CTransactionRef& ptx, int64_t vsize,
|
|
103
|
+
const std::string& reason_prefix, std::string& out_reason,
|
|
104
|
+
const ignore_rejects_type& ignore_rejects,
|
|
105
|
+
const Package& package,
|
|
106
|
+
const CTxMemPool::setEntries& mempool_ancestors);
|
|
107
|
+
|
|
92
108
|
std::optional<std::string> PackageTRUCChecks(const CTransactionRef& ptx, int64_t vsize,
|
|
93
109
|
const Package& package,
|
|
94
110
|
const CTxMemPool::setEntries& mempool_ancestors);
|