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)
125125 for (const auto & tx_info : tx_pool.infoAll ()) {
126126 const auto & entry = *Assert (tx_pool.GetEntry (tx_info.tx ->GetHash ()));
127127 if (tx_info.tx ->nVersion == 3 ) {
128+ // Check that special maximum virtual size is respected
129+ Assert (entry.GetTxSize () <= V3_MAX_VSIZE);
130+
128131 // Check that special v3 ancestor/descendant limits and rules are always respected
129132 Assert (entry.GetCountWithDescendants () <= V3_DESCENDANT_LIMIT);
130133 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+
131137 // If this transaction has at least 1 ancestor, it's a "child" and has restricted weight.
132138 if (entry.GetCountWithAncestors () > 1 ) {
133139 Assert (entry.GetTxSize () <= V3_CHILD_MAX_VSIZE);
You can’t perform that action at this time.
0 commit comments