diff options
author | Bojie Wu <bojie@dexon.org> | 2018-10-15 22:09:25 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 222699705e6fc1d6e3a645b8ad654ea71f99f506 (patch) | |
tree | b6c2377d9cb2fb45a92dc36d20a012be9caaca7e /core | |
parent | 2a231b21a8245dc8e46ebf5913262524ba295e94 (diff) | |
download | dexon-222699705e6fc1d6e3a645b8ad654ea71f99f506.tar dexon-222699705e6fc1d6e3a645b8ad654ea71f99f506.tar.gz dexon-222699705e6fc1d6e3a645b8ad654ea71f99f506.tar.bz2 dexon-222699705e6fc1d6e3a645b8ad654ea71f99f506.tar.lz dexon-222699705e6fc1d6e3a645b8ad654ea71f99f506.tar.xz dexon-222699705e6fc1d6e3a645b8ad654ea71f99f506.tar.zst dexon-222699705e6fc1d6e3a645b8ad654ea71f99f506.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 9a5f35037..e8e1ac32c 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)) |