future queued block support

- queued       bool // flag for blockpool to skip TD check
- set to true when future block queued
- in checkTD: skip check if queued
- TODO: add test (insertchain sets future block)
This commit is contained in:
zelig
2015-04-08 12:43:55 +01:00
parent cbd0b42060
commit 262714fc6c
3 changed files with 7 additions and 1 deletions

View File

@ -471,6 +471,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error {
// Do not penelise on future block. We'll need a block queue eventually that will queue
// future block for future use
if err == BlockFutureErr {
block.SetQueued(true)
self.futureBlocks.Push(block)
stats.queued++
continue