diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-08-24 08:52:53 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-08-25 10:46:11 +0800 |
commit | 7324176f702a77fc331bf16a968d2eb4bccce021 (patch) | |
tree | a9fef3b9ee46fc382dde23cdd90209cc4298dd59 /core/chain_manager.go | |
parent | d51d0022cee91d6588186455afbe6e54fae2cbf7 (diff) | |
download | go-tangerine-7324176f702a77fc331bf16a968d2eb4bccce021.tar.gz go-tangerine-7324176f702a77fc331bf16a968d2eb4bccce021.tar.zst go-tangerine-7324176f702a77fc331bf16a968d2eb4bccce021.zip |
Add tests for uncle timestamps and refactor timestamp type
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r-- | core/chain_manager.go | 3 |
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) } |