@@ -2183,7 +2183,7 @@ CoinsCacheSizeState CChainState::GetCoinsCacheSizeState(
2183
2183
const int64_t nMempoolUsage = m_mempool ? m_mempool->DynamicMemoryUsage () : 0 ;
2184
2184
int64_t cacheSize = CoinsTip ().DynamicMemoryUsage ();
2185
2185
int64_t nTotalSpace =
2186
- max_coins_cache_size_bytes + std::max<int64_t >(max_mempool_size_bytes - nMempoolUsage, 0 );
2186
+ max_coins_cache_size_bytes + std::max<int64_t >(int64_t ( max_mempool_size_bytes) - nMempoolUsage, 0 );
2187
2187
2188
2188
// ! No need to periodic flush if at least this much space still available.
2189
2189
static constexpr int64_t MAX_BLOCK_COINSDB_USAGE_BYTES = 10 * 1024 * 1024 ; // 10MB
@@ -3621,7 +3621,7 @@ bool CChainState::AcceptBlock(const std::shared_ptr<const CBlock>& pblock, Block
3621
3621
// blocks which are too close in height to the tip. Apply this test
3622
3622
// regardless of whether pruning is enabled; it should generally be safe to
3623
3623
// not process unrequested blocks.
3624
- bool fTooFarAhead = ( pindex->nHeight > int ( m_chain.Height () + MIN_BLOCKS_TO_KEEP)) ;
3624
+ bool fTooFarAhead { pindex->nHeight > m_chain.Height () + int ( MIN_BLOCKS_TO_KEEP)} ;
3625
3625
3626
3626
// TODO: Decouple this function from the block download logic by removing fRequested
3627
3627
// This requires some new chain data structure to efficiently look up if a
@@ -3843,7 +3843,7 @@ void BlockManager::FindFilesToPrune(std::set<int>& setFilesToPrune, uint64_t nPr
3843
3843
return ;
3844
3844
}
3845
3845
3846
- unsigned int nLastBlockWeCanPrune = std::min (prune_height, chain_tip_height - static_cast <int >(MIN_BLOCKS_TO_KEEP));
3846
+ unsigned int nLastBlockWeCanPrune{( unsigned ) std::min (prune_height, chain_tip_height - static_cast <int >(MIN_BLOCKS_TO_KEEP))} ;
3847
3847
uint64_t nCurrentUsage = CalculateCurrentUsage ();
3848
3848
// We don't check to prune until after we've allocated new space for files
3849
3849
// So we should leave a buffer under our target to account for another allocation
@@ -4443,8 +4443,8 @@ void CChainState::LoadExternalBlockFile(FILE* fileIn, FlatFilePos* dbp)
4443
4443
try {
4444
4444
// locate a header
4445
4445
unsigned char buf[CMessageHeader::MESSAGE_START_SIZE];
4446
- blkdat.FindByte (m_params.MessageStart ()[0 ]);
4447
- nRewind = blkdat.GetPos ()+ 1 ;
4446
+ blkdat.FindByte (char ( m_params.MessageStart ()[0 ]) );
4447
+ nRewind = blkdat.GetPos () + 1 ;
4448
4448
blkdat >> buf;
4449
4449
if (memcmp (buf, m_params.MessageStart (), CMessageHeader::MESSAGE_START_SIZE)) {
4450
4450
continue ;
0 commit comments