You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugin/evm/customheader/time.go
+61-12Lines changed: 61 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,13 @@ var (
24
24
ErrTimeMillisecondsRequired=errors.New("TimeMilliseconds is required after Granite activation")
25
25
ErrTimeMillisecondsMismatched=errors.New("TimeMilliseconds does not match header.Time")
26
26
ErrTimeMillisecondsBeforeGranite=errors.New("TimeMilliseconds should be nil before Granite activation")
27
+
ErrMinDelayNotMet=errors.New("minimum block delay not met")
28
+
ErrGraniteClockBehindParent=errors.New("current timestamp is not allowed to be behind than parent timestamp in Granite")
27
29
)
28
30
29
-
// GetNextTimestamp calculates the timestamp (in seconds and milliseconds) for the next child block based on the parent's timestamp and the current time.
31
+
// GetNextTimestamp calculates the timestamp (in seconds and milliseconds) for the header based on the parent's timestamp and the current time.
30
32
// First return value is the timestamp in seconds, second return value is the timestamp in milliseconds.
31
-
funcGetNextTimestamp(parent*types.Header, now time.Time) (uint64, uint64) {
33
+
funcGetNextTimestamp(parent*types.Header, config*extras.ChainConfig, now time.Time) (uint64, uint64, error) {
0 commit comments