File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,16 @@ static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101;
60
60
static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25 ;
61
61
/* * Default for -limitdescendantsize, maximum kilobytes of in-mempool descendants */
62
62
static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101 ;
63
+
64
+ // If a package is submitted, it must be within the mempool's ancestor/descendant limits. Since a
65
+ // submitted package must be child-with-unconfirmed-parents (all of the transactions are an ancestor
66
+ // of the child), package limits are ultimately bounded by mempool package limits. Ensure that the
67
+ // defaults reflect this constraint.
68
+ static_assert (DEFAULT_DESCENDANT_LIMIT >= MAX_PACKAGE_COUNT);
69
+ static_assert (DEFAULT_ANCESTOR_LIMIT >= MAX_PACKAGE_COUNT);
70
+ static_assert (DEFAULT_ANCESTOR_SIZE_LIMIT >= MAX_PACKAGE_SIZE);
71
+ static_assert (DEFAULT_DESCENDANT_SIZE_LIMIT >= MAX_PACKAGE_SIZE);
72
+
63
73
/* * Default for -mempoolexpiry, expiration time for mempool transactions in hours */
64
74
static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336 ;
65
75
/* * Maximum number of dedicated script-checking threads allowed */
You can’t perform that action at this time.
0 commit comments