From c2ad89a8b60ff6eb0f6ef0807b2074ac698e09d4 Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Tue, 26 Feb 2019 15:19:51 -0600 Subject: [PATCH] invalid timestamp from log issue (#1720) --- beacon-chain/powchain/service.go | 3 --- beacon-chain/powchain/service_test.go | 10 +--------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/beacon-chain/powchain/service.go b/beacon-chain/powchain/service.go index 70f6afee0f..cf9f712194 100644 --- a/beacon-chain/powchain/service.go +++ b/beacon-chain/powchain/service.go @@ -244,9 +244,6 @@ func (w *Web3Service) HasChainStartLogOccurred() (bool, uint64, error) { return false, 0, nil } timestamp := binary.LittleEndian.Uint64(genesisTime) - if uint64(time.Now().Unix()) < timestamp { - return false, 0, fmt.Errorf("invalid timestamp from log expected %d > %d", time.Now().Unix(), timestamp) - } return true, timestamp, nil } diff --git a/beacon-chain/powchain/service_test.go b/beacon-chain/powchain/service_test.go index 4484b5aeaa..efd814d408 100644 --- a/beacon-chain/powchain/service_test.go +++ b/beacon-chain/powchain/service_test.go @@ -775,15 +775,7 @@ func TestProcessChainStartLog_OK(t *testing.T) { ) } - genesisTime := <-genesisTimeChan - if genesisTime.Unix() > time.Now().Unix() { - t.Errorf( - "Timestamp from log is higher than the current time %d > %d", - genesisTime.Unix(), - time.Now().Unix(), - ) - } - + <-genesisTimeChan testutil.AssertLogsDoNotContain(t, hook, "Unable to unpack ChainStart log data") testutil.AssertLogsDoNotContain(t, hook, "Receipt root from log doesn't match the root saved in memory") testutil.AssertLogsDoNotContain(t, hook, "Invalid timestamp from log")