diff options
author | Péter Szilágyi <peterke@gmail.com> | 2019-02-05 18:49:59 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-02-07 20:36:25 +0800 |
commit | d6225ab846d1abeeb9ba9e9aad84bc566ddf52f2 (patch) | |
tree | 6105a12328eba306896de5421b6d91ff775a0d56 /core | |
parent | 85b3b1c8d60db82af9138a0649f6e6dce6b49cad (diff) | |
download | go-tangerine-d6225ab846d1abeeb9ba9e9aad84bc566ddf52f2.tar go-tangerine-d6225ab846d1abeeb9ba9e9aad84bc566ddf52f2.tar.gz go-tangerine-d6225ab846d1abeeb9ba9e9aad84bc566ddf52f2.tar.bz2 go-tangerine-d6225ab846d1abeeb9ba9e9aad84bc566ddf52f2.tar.lz go-tangerine-d6225ab846d1abeeb9ba9e9aad84bc566ddf52f2.tar.xz go-tangerine-d6225ab846d1abeeb9ba9e9aad84bc566ddf52f2.tar.zst go-tangerine-d6225ab846d1abeeb9ba9e9aad84bc566ddf52f2.zip |
cmd/utils, eth: relinquish GC cache to read cache in archive mode
Diffstat (limited to 'core')
-rw-r--r-- | core/blockchain.go | 4 | ||||
-rw-r--r-- | core/blockchain_insert.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 93caf9f36..c852926ef 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1253,8 +1253,8 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, [] stats.processed++ stats.usedGas += usedGas - cache, _ := bc.stateCache.TrieDB().Size() - stats.report(chain, it.index, cache) + dirty, _ := bc.stateCache.TrieDB().Size() + stats.report(chain, it.index, dirty) } // Any blocks remaining here? The only ones we care about are the future ones if block != nil && err == consensus.ErrFutureBlock { diff --git a/core/blockchain_insert.go b/core/blockchain_insert.go index cfa32c5aa..f07e24d75 100644 --- a/core/blockchain_insert.go +++ b/core/blockchain_insert.go @@ -39,7 +39,7 @@ const statsReportLimit = 8 * time.Second // report prints statistics if some number of blocks have been processed // or more than a few seconds have passed since the last message. -func (st *insertStats) report(chain []*types.Block, index int, cache common.StorageSize) { +func (st *insertStats) report(chain []*types.Block, index int, dirty common.StorageSize) { // Fetch the timings for the batch var ( now = mclock.Now() @@ -63,7 +63,7 @@ func (st *insertStats) report(chain []*types.Block, index int, cache common.Stor if timestamp := time.Unix(end.Time().Int64(), 0); time.Since(timestamp) > time.Minute { context = append(context, []interface{}{"age", common.PrettyAge(timestamp)}...) } - context = append(context, []interface{}{"cache", cache}...) + context = append(context, []interface{}{"dirty", dirty}...) if st.queued > 0 { context = append(context, []interface{}{"queued", st.queued}...) |