File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1847,7 +1847,7 @@ impl<LoggerErrorT: Debug> ProviderData<LoggerErrorT> {
1847
1847
i64:: try_from ( SystemTime :: now ( ) . duration_since ( UNIX_EPOCH ) ?. as_secs ( ) )
1848
1848
. expect ( "timestamp too large" ) ;
1849
1849
1850
- let ( mut block_timestamp, new_offset) = if let Some ( timestamp) = timestamp {
1850
+ let ( mut block_timestamp, mut new_offset) = if let Some ( timestamp) = timestamp {
1851
1851
timestamp. checked_sub ( latest_block_header. timestamp ) . ok_or (
1852
1852
ProviderError :: TimestampLowerThanPrevious {
1853
1853
proposed : timestamp,
@@ -1873,6 +1873,9 @@ impl<LoggerErrorT: Debug> ProviderData<LoggerErrorT> {
1873
1873
&& !self . allow_blocks_with_same_timestamp ;
1874
1874
if timestamp_needs_increase {
1875
1875
block_timestamp += 1 ;
1876
+ if new_offset. is_none ( ) {
1877
+ new_offset = Some ( self . block_time_offset_seconds + 1 ) ;
1878
+ }
1876
1879
}
1877
1880
1878
1881
Ok ( ( block_timestamp, new_offset) )
You can’t perform that action at this time.
0 commit comments