diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-04 22:35:23 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-04 22:35:23 +0800 |
commit | e1ed8c33bd99a87d2c3339fe28a602b1af8b85fc (patch) | |
tree | fcbb59358cab8df4e6aa005e22e5e9a22edcb5b4 /core/chain_makers.go | |
parent | 29f120206e16f80176a0cb309162cc7f889be0b0 (diff) | |
download | dexon-e1ed8c33bd99a87d2c3339fe28a602b1af8b85fc.tar.gz dexon-e1ed8c33bd99a87d2c3339fe28a602b1af8b85fc.tar.zst dexon-e1ed8c33bd99a87d2c3339fe28a602b1af8b85fc.zip |
Improved chain manager, improved block processor, fixed tests
* ChainManager allows cached future blocks for later processing
* BlockProcessor allows a 4 second window on future blocks
* Fixed tests
Diffstat (limited to 'core/chain_makers.go')
-rw-r--r-- | core/chain_makers.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/chain_makers.go b/core/chain_makers.go index 52cb367c5..6597cc315 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -109,6 +109,7 @@ func makeChain(bman *BlockProcessor, parent *types.Block, max int, db common.Dat // Effectively a fork factory func newChainManager(block *types.Block, eventMux *event.TypeMux, db common.Database) *ChainManager { bc := &ChainManager{blockDb: db, stateDb: db, genesisBlock: GenesisBlock(db), eventMux: eventMux} + bc.futureBlocks = NewBlockCache(1000) if block == nil { bc.Reset() } else { |