invalid timestamp from log issue (#1720)

This commit is contained in:
Raul Jordan 2019-02-26 15:19:51 -06:00 committed by GitHub
parent 28e360665d
commit c2ad89a8b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View File

@ -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
}

View File

@ -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")