mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-12 20:50:05 +00:00
invalid timestamp from log issue (#1720)
This commit is contained in:
parent
28e360665d
commit
c2ad89a8b6
@ -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
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user