File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -875,11 +875,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
875
875
fCheckBlockIndex = GetBoolArg (" -checkblockindex" , chainparams.DefaultConsistencyChecks ());
876
876
fCheckpointsEnabled = GetBoolArg (" -checkpoints" , true );
877
877
878
- // -mempoollimit limits
879
- int64_t nMempoolSizeLimit = GetArg (" -maxmempool" , DEFAULT_MAX_MEMPOOL_SIZE) * 1000000 ;
880
- int64_t nMempoolDescendantSizeLimit = GetArg (" -limitdescendantsize" , DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000 ;
881
- if (nMempoolSizeLimit < 0 || nMempoolSizeLimit < nMempoolDescendantSizeLimit * 40 )
882
- return InitError (strprintf (_ (" -maxmempool must be at least %d MB" ), GetArg ( " -limitdescendantsize " , DEFAULT_DESCENDANT_SIZE_LIMIT) / 25 ));
878
+ // mempool limits
879
+ int64_t nMempoolSizeMax = GetArg (" -maxmempool" , DEFAULT_MAX_MEMPOOL_SIZE) * 1000000 ;
880
+ int64_t nMempoolSizeMin = GetArg (" -limitdescendantsize" , DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000 * 40 ;
881
+ if (nMempoolSizeMax < 0 || nMempoolSizeMax < nMempoolSizeMin )
882
+ return InitError (strprintf (_ (" -maxmempool must be at least %d MB" ), std::ceil (nMempoolSizeMin / 1000.0 ) ));
883
883
884
884
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
885
885
nScriptCheckThreads = GetArg (" -par" , DEFAULT_SCRIPTCHECK_THREADS);
You can’t perform that action at this time.
0 commit comments