This commit is contained in:
gary rong 2018-03-01 10:29:56 +00:00 committed by GitHub
commit 64ae651aac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -930,7 +930,7 @@ func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types.
}
}
// If optimum or critical limits reached, write to disk
if chosen >= lastWrite+triesInMemory || size >= 2*limit || bc.gcproc >= 2*bc.cacheConfig.TrieTimeLimit {
if chosen >= lastWrite+triesInMemory || size >= limit || bc.gcproc >= bc.cacheConfig.TrieTimeLimit {
triedb.Commit(header.Root, true)
lastWrite = chosen
bc.gcproc = 0