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
This commit is contained in:
obscuren
2015-04-04 16:35:23 +02:00
parent 29f120206e
commit e1ed8c33bd
4 changed files with 44 additions and 7 deletions

View File

@ -260,7 +260,7 @@ func (sm *BlockProcessor) ValidateHeader(block, parent *types.Header) error {
}
// Allow future blocks up to 10 seconds
if int64(block.Time)+10 > time.Now().Unix() {
if int64(block.Time) > time.Now().Unix()+4 {
return BlockFutureErr
}