diff options
author | Bojie Wu <bojie@dexon.org> | 2018-10-15 22:09:25 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | fc412f8662b6ce02300541840c54bacdb4756ac1 (patch) | |
tree | cfc600d93afbbe9391967335ed5bf1f8a6bb512c /core | |
parent | 48071f3c63d780e13b547a33c00f371145d80f30 (diff) | |
download | dexon-fc412f8662b6ce02300541840c54bacdb4756ac1.tar dexon-fc412f8662b6ce02300541840c54bacdb4756ac1.tar.gz dexon-fc412f8662b6ce02300541840c54bacdb4756ac1.tar.bz2 dexon-fc412f8662b6ce02300541840c54bacdb4756ac1.tar.lz dexon-fc412f8662b6ce02300541840c54bacdb4756ac1.tar.xz dexon-fc412f8662b6ce02300541840c54bacdb4756ac1.tar.zst dexon-fc412f8662b6ce02300541840c54bacdb4756ac1.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 d5f1e483b..234a67d6c 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)) |