aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_manager.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-08-25 21:49:36 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-08-25 21:54:57 +0800
commitfd512fa12c59657d9e47cc3411e6e24bd1af89cb (patch)
tree16ddada3b6ecbf26e53bb9eaf0c8b03812f7cab8 /core/chain_manager.go
parentdc3fb69dce674069479313837a5612045303c418 (diff)
downloadgo-tangerine-1.1.0.tar
go-tangerine-1.1.0.tar.gz
go-tangerine-1.1.0.tar.bz2
go-tangerine-1.1.0.tar.lz
go-tangerine-1.1.0.tar.xz
go-tangerine-1.1.0.tar.zst
go-tangerine-1.1.0.zip
Merge pull request #1711 from Gustav-Simonsson/timestamp_big_intv1.1.0
Add tests for uncle timestamps and refactor timestamp type (cherry picked from commit abce09954b6901b446c004ee06b389c338922f28)
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r--core/chain_manager.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go
index cf5b8bd78..c8127951e 100644
--- a/core/chain_manager.go
+++ b/core/chain_manager.go
@@ -596,7 +596,8 @@ 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 := uint64(time.Now().Unix()) + maxTimeFutureBlocks; block.Time() > max {
+ max := big.NewInt(time.Now().Unix() + maxTimeFutureBlocks)
+ if block.Time().Cmp(max) == 1 {
return i, fmt.Errorf("%v: BlockFutureErr, %v > %v", BlockFutureErr, block.Time(), max)
}