mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
parent
d23f306fc1
commit
a53b1d8b29
@ -27,7 +27,7 @@ func checkTime(
|
||||
timestamp = int(cs)
|
||||
}
|
||||
}
|
||||
if timestamp > seconds {
|
||||
if timestamp < seconds {
|
||||
return fmt.Errorf("%w: got ts: %d, need: %d", errTimestampTooOld, timestamp, seconds)
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ func TestProcessHealthcheckIfNeeded_HeadersTests(t *testing.T) {
|
||||
netApiResponse: hexutil.Uint(1),
|
||||
netApiError: nil,
|
||||
ethApiBlockResult: map[string]interface{}{
|
||||
"timestamp": time.Now().Add(1 * time.Second).Unix(),
|
||||
"timestamp": uint64(time.Now().Add(-10 * time.Second).Unix()),
|
||||
},
|
||||
ethApiBlockError: nil,
|
||||
ethApiSyncingResult: false,
|
||||
@ -264,7 +264,7 @@ func TestProcessHealthcheckIfNeeded_HeadersTests(t *testing.T) {
|
||||
netApiResponse: hexutil.Uint(1),
|
||||
netApiError: nil,
|
||||
ethApiBlockResult: map[string]interface{}{
|
||||
"timestamp": uint64(time.Now().Add(1 * time.Hour).Unix()),
|
||||
"timestamp": uint64(time.Now().Add(-1 * time.Hour).Unix()),
|
||||
},
|
||||
ethApiBlockError: nil,
|
||||
ethApiSyncingResult: false,
|
||||
@ -319,7 +319,7 @@ func TestProcessHealthcheckIfNeeded_HeadersTests(t *testing.T) {
|
||||
netApiResponse: hexutil.Uint(10),
|
||||
netApiError: nil,
|
||||
ethApiBlockResult: map[string]interface{}{
|
||||
"timestamp": time.Now().Add(1 * time.Second).Unix(),
|
||||
"timestamp": uint64(time.Now().Add(1 * time.Second).Unix()),
|
||||
},
|
||||
ethApiBlockError: nil,
|
||||
ethApiSyncingResult: false,
|
||||
|
Loading…
Reference in New Issue
Block a user