diff options
author | Bojie Wu <bojie@dexon.org> | 2018-10-15 22:09:25 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:50 +0800 |
commit | 8a2cd037f77716cf83d17b9cfe8831c81427b91e (patch) | |
tree | 62f90bc0e9b7626d67d35b698c3e68955b45dbc5 /core | |
parent | 0a000e0595b6b683d6a57776b4e5381a92c20765 (diff) | |
download | dexon-8a2cd037f77716cf83d17b9cfe8831c81427b91e.tar.gz dexon-8a2cd037f77716cf83d17b9cfe8831c81427b91e.tar.zst dexon-8a2cd037f77716cf83d17b9cfe8831c81427b91e.zip |
app: init map
Diffstat (limited to 'core')
-rw-r--r-- | core/blockchain.go | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 30516f7f6..88287a21d 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -165,21 +165,23 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par badBlocks, _ := lru.New(badBlockLimit) bc := &BlockChain{ - chainConfig: chainConfig, - cacheConfig: cacheConfig, - db: db, - triegc: prque.New(nil), - stateCache: state.NewDatabaseWithCache(db, cacheConfig.TrieCleanLimit), - quit: make(chan struct{}), - shouldPreserve: shouldPreserve, - bodyCache: bodyCache, - bodyRLPCache: bodyRLPCache, - receiptsCache: receiptsCache, - blockCache: blockCache, - futureBlocks: futureBlocks, - engine: engine, - vmConfig: vmConfig, - badBlocks: badBlocks, + chainConfig: chainConfig, + cacheConfig: cacheConfig, + db: db, + triegc: prque.New(nil), + stateCache: state.NewDatabaseWithCache(db, cacheConfig.TrieCleanLimit), + quit: make(chan struct{}), + shouldPreserve: shouldPreserve, + bodyCache: bodyCache, + bodyRLPCache: bodyRLPCache, + receiptsCache: receiptsCache, + blockCache: blockCache, + futureBlocks: futureBlocks, + engine: engine, + vmConfig: vmConfig, + badBlocks: badBlocks, + confirmedBlock: make(map[coreCommon.Hash]*coreTypes.Block), + filteredConfirmedBlock: make(map[uint32]map[coreCommon.Hash]*coreTypes.Block), } bc.SetValidator(NewBlockValidator(chainConfig, bc, engine)) bc.SetProcessor(NewStateProcessor(chainConfig, bc, engine)) |