diff options
author | Bojie Wu <bojie@dexon.org> | 2018-10-15 22:09:25 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:23:39 +0800 |
commit | 16f356dcf34722510c59a1f946a5ffa138bd6da7 (patch) | |
tree | 358f8e03a57fa54350259fc8337523655dc86322 /core | |
parent | 863b02b80727a7a4aa704dca75146cf0691dfcfd (diff) | |
download | go-tangerine-16f356dcf34722510c59a1f946a5ffa138bd6da7.tar go-tangerine-16f356dcf34722510c59a1f946a5ffa138bd6da7.tar.gz go-tangerine-16f356dcf34722510c59a1f946a5ffa138bd6da7.tar.bz2 go-tangerine-16f356dcf34722510c59a1f946a5ffa138bd6da7.tar.lz go-tangerine-16f356dcf34722510c59a1f946a5ffa138bd6da7.tar.xz go-tangerine-16f356dcf34722510c59a1f946a5ffa138bd6da7.tar.zst go-tangerine-16f356dcf34722510c59a1f946a5ffa138bd6da7.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)) |