File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,15 @@ static constexpr uint32_t MAX_PACKAGE_COUNT{25};
1919static constexpr uint32_t MAX_PACKAGE_SIZE{101 };
2020static_assert (MAX_PACKAGE_SIZE * WITNESS_SCALE_FACTOR * 1000 >= MAX_STANDARD_TX_WEIGHT);
2121
22+ // If a package is submitted, it must be within the mempool's ancestor/descendant limits. Since a
23+ // submitted package must be child-with-unconfirmed-parents (all of the transactions are an ancestor
24+ // of the child), package limits are ultimately bounded by mempool package limits. Ensure that the
25+ // defaults reflect this constraint.
26+ static_assert (DEFAULT_DESCENDANT_LIMIT >= MAX_PACKAGE_COUNT);
27+ static_assert (DEFAULT_ANCESTOR_LIMIT >= MAX_PACKAGE_COUNT);
28+ static_assert (DEFAULT_ANCESTOR_SIZE_LIMIT >= MAX_PACKAGE_SIZE);
29+ static_assert (DEFAULT_DESCENDANT_SIZE_LIMIT >= MAX_PACKAGE_SIZE);
30+
2231/* * A "reason" why a package was invalid. It may be that one or more of the included
2332 * transactions is invalid or the package itself violates our rules.
2433 * We don't distinguish between consensus and policy violations right now.
Original file line number Diff line number Diff line change @@ -59,15 +59,6 @@ namespace Consensus {
5959struct Params ;
6060} // namespace Consensus
6161
62- // If a package is submitted, it must be within the mempool's ancestor/descendant limits. Since a
63- // submitted package must be child-with-unconfirmed-parents (all of the transactions are an ancestor
64- // of the child), package limits are ultimately bounded by mempool package limits. Ensure that the
65- // defaults reflect this constraint.
66- static_assert (DEFAULT_DESCENDANT_LIMIT >= MAX_PACKAGE_COUNT);
67- static_assert (DEFAULT_ANCESTOR_LIMIT >= MAX_PACKAGE_COUNT);
68- static_assert (DEFAULT_ANCESTOR_SIZE_LIMIT >= MAX_PACKAGE_SIZE);
69- static_assert (DEFAULT_DESCENDANT_SIZE_LIMIT >= MAX_PACKAGE_SIZE);
70-
7162/* * Default for -mempoolexpiry, expiration time for mempool transactions in hours */
7263static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336 ;
7364/* * Maximum number of dedicated script-checking threads allowed */
You can’t perform that action at this time.
0 commit comments