@@ -84,7 +84,6 @@ use macros::map;
84
84
use parking_lot:: RwLock ;
85
85
use rand:: Rng ;
86
86
use unexpected:: { Mismatch , OutOfBounds } ;
87
- use time_utils:: CheckedSystemTime ;
88
87
use common_types:: {
89
88
BlockNumber ,
90
89
ids:: BlockId ,
@@ -571,7 +570,7 @@ impl Engine for Clique {
571
570
572
571
// Don't waste time checking blocks from the future
573
572
{
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 ) )
575
574
. ok_or ( BlockError :: TimestampOverflow ) ?;
576
575
577
576
// This should succeed under the constraints that the system clock works
@@ -581,7 +580,7 @@ impl Engine for Clique {
581
580
582
581
let hdr = Duration :: from_secs ( header. timestamp ( ) ) ;
583
582
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 ) ?;
585
584
586
585
Err ( BlockError :: TemporarilyInvalid ( OutOfBounds {
587
586
min : None ,
@@ -692,8 +691,8 @@ impl Engine for Clique {
692
691
// Ensure that the block's timestamp isn't too close to it's parent
693
692
let limit = parent. timestamp ( ) . saturating_add ( self . period ) ;
694
693
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) )
697
696
. ok_or ( BlockError :: TimestampOverflow ) ?;
698
697
699
698
Err ( BlockError :: InvalidTimestamp ( OutOfBounds {
0 commit comments