Use uint64 for block header timestamp

This commit is contained in:
Gustav Simonsson
2015-06-30 09:13:16 +02:00
parent be935bff84
commit 4c490db6af
12 changed files with 24 additions and 25 deletions

View File

@ -658,7 +658,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) {
// Allow up to MaxFuture second in the future blocks. If this limit
// is exceeded the chain is discarded and processed at a later time
// if given.
if max := time.Now().Unix() + maxTimeFutureBlocks; block.Time() > max {
if max := time.Now().Unix() + maxTimeFutureBlocks; int64(block.Time()) > max {
return i, fmt.Errorf("%v: BlockFutureErr, %v > %v", BlockFutureErr, block.Time(), max)
}