@ -1216,10 +1216,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
nTotalCache = std : : max ( nTotalCache , nMinDbCache < < 20 ) ; // total cache cannot be less than nMinDbCache
nTotalCache = std : : max ( nTotalCache , nMinDbCache < < 20 ) ; // total cache cannot be less than nMinDbCache
nTotalCache = std : : min ( nTotalCache , nMaxDbCache < < 20 ) ; // total cache cannot be greated than nMaxDbcache
nTotalCache = std : : min ( nTotalCache , nMaxDbCache < < 20 ) ; // total cache cannot be greated than nMaxDbcache
int64_t nBlockTreeDBCache = nTotalCache / 8 ;
int64_t nBlockTreeDBCache = nTotalCache / 8 ;
if ( nBlockTreeDBCache > ( 1 < < 21 ) & & ! GetBoolArg ( " -txindex " , DEFAULT_TXINDEX ) )
nBlockTreeDBCache = std : : min ( nBlockTreeDBCache , ( GetBoolArg ( " -txindex " , DEFAULT_TXINDEX ) ? nMaxBlockDBAndTxIndexCache : nMaxBlockDBCache ) < < 20 ) ;
nBlockTreeDBCache = ( 1 < < 21 ) ; // block tree db cache shouldn't be larger than 2 MiB
nTotalCache - = nBlockTreeDBCache ;
nTotalCache - = nBlockTreeDBCache ;
int64_t nCoinDBCache = std : : min ( nTotalCache / 2 , ( nTotalCache / 4 ) + ( 1 < < 23 ) ) ; // use 25%-50% of the remainder for disk cache
int64_t nCoinDBCache = std : : min ( nTotalCache / 2 , ( nTotalCache / 4 ) + ( 1 < < 23 ) ) ; // use 25%-50% of the remainder for disk cache
nCoinDBCache = std : : min ( nCoinDBCache , nMaxCoinsDBCache < < 20 ) ; // cap total coins db cache
nTotalCache - = nCoinDBCache ;
nTotalCache - = nCoinDBCache ;
nCoinCacheUsage = nTotalCache ; // the rest goes to in-memory cache
nCoinCacheUsage = nTotalCache ; // the rest goes to in-memory cache
LogPrintf ( " Cache configuration: \n " ) ;
LogPrintf ( " Cache configuration: \n " ) ;