File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,15 @@ void CheckMempoolV3Invariants(const CTxMemPool& tx_pool)
125
125
for (const auto & tx_info : tx_pool.infoAll ()) {
126
126
const auto & entry = *Assert (tx_pool.GetEntry (tx_info.tx ->GetHash ()));
127
127
if (tx_info.tx ->nVersion == 3 ) {
128
+ // Check that special maximum virtual size is respected
129
+ Assert (entry.GetTxSize () <= V3_MAX_VSIZE);
130
+
128
131
// Check that special v3 ancestor/descendant limits and rules are always respected
129
132
Assert (entry.GetCountWithDescendants () <= V3_DESCENDANT_LIMIT);
130
133
Assert (entry.GetCountWithAncestors () <= V3_ANCESTOR_LIMIT);
134
+ Assert (entry.GetSizeWithDescendants () <= V3_MAX_VSIZE + V3_CHILD_MAX_VSIZE);
135
+ Assert (entry.GetSizeWithAncestors () <= V3_MAX_VSIZE + V3_CHILD_MAX_VSIZE);
136
+
131
137
// If this transaction has at least 1 ancestor, it's a "child" and has restricted weight.
132
138
if (entry.GetCountWithAncestors () > 1 ) {
133
139
Assert (entry.GetTxSize () <= V3_CHILD_MAX_VSIZE);
You can’t perform that action at this time.
0 commit comments