@@ -84,7 +84,6 @@ use macros::map;
8484use parking_lot:: RwLock ;
8585use rand:: Rng ;
8686use unexpected:: { Mismatch , OutOfBounds } ;
87- use time_utils:: CheckedSystemTime ;
8887use common_types:: {
8988 BlockNumber ,
9089 ids:: BlockId ,
@@ -571,7 +570,7 @@ impl Engine for Clique {
571570
572571 // Don't waste time checking blocks from the future
573572 {
574- let limit = CheckedSystemTime :: checked_add ( SystemTime :: now ( ) , Duration :: from_secs ( self . period ) )
573+ let limit = SystemTime :: now ( ) . checked_add ( Duration :: from_secs ( self . period ) )
575574 . ok_or ( BlockError :: TimestampOverflow ) ?;
576575
577576 // This should succeed under the constraints that the system clock works
@@ -581,7 +580,7 @@ impl Engine for Clique {
581580
582581 let hdr = Duration :: from_secs ( header. timestamp ( ) ) ;
583582 if hdr > limit_as_dur {
584- let found = CheckedSystemTime :: checked_add ( UNIX_EPOCH , hdr) . ok_or ( BlockError :: TimestampOverflow ) ?;
583+ let found = UNIX_EPOCH . checked_add ( hdr) . ok_or ( BlockError :: TimestampOverflow ) ?;
585584
586585 Err ( BlockError :: TemporarilyInvalid ( OutOfBounds {
587586 min : None ,
@@ -692,8 +691,8 @@ impl Engine for Clique {
692691 // Ensure that the block's timestamp isn't too close to it's parent
693692 let limit = parent. timestamp ( ) . saturating_add ( self . period ) ;
694693 if limit > header. timestamp ( ) {
695- let max = CheckedSystemTime :: checked_add ( UNIX_EPOCH , Duration :: from_secs ( header. timestamp ( ) ) ) ;
696- let found = CheckedSystemTime :: checked_add ( UNIX_EPOCH , Duration :: from_secs ( limit) )
694+ let max = UNIX_EPOCH . checked_add ( Duration :: from_secs ( header. timestamp ( ) ) ) ;
695+ let found = UNIX_EPOCH . checked_add ( Duration :: from_secs ( limit) )
697696 . ok_or ( BlockError :: TimestampOverflow ) ?;
698697
699698 Err ( BlockError :: InvalidTimestamp ( OutOfBounds {
0 commit comments