File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -166,11 +166,13 @@ impl InnerLightClient {
166166
167167 let height = client_state. latest_height ;
168168 let timestamp = consensus_state. timestamp ;
169+ let milli_timestamp = ( timestamp. as_unix_timestamp_nanos ( ) / 1_000_000 ) as u64 ;
169170
170171 #[ allow( clippy:: absurd_extreme_comparisons) ]
171- if timestamp . as_unix_timestamp_secs ( ) < MINIMUM_TIMESTAMP_SUPPORTED {
172+ if milli_timestamp < MINIMUM_TIMESTAMP_SUPPORTED {
172173 return Err ( Error :: UnsupportedMinimumTimestamp ( timestamp) ) ;
173174 }
175+
174176 #[ allow( clippy:: absurd_extreme_comparisons) ]
175177 if height. revision_height ( ) < MINIMUM_HEIGHT_SUPPORTED {
176178 return Err ( Error :: UnsupportedMinimumHeight ( height) ) ;
Original file line number Diff line number Diff line change 11pub const BLOCKS_PER_EPOCH : u64 = 500 ;
2- pub const MINIMUM_TIMESTAMP_SUPPORTED : u64 = 110 ;
3- pub const MINIMUM_HEIGHT_SUPPORTED : u64 = 100 ;
2+ pub const MINIMUM_TIMESTAMP_SUPPORTED : u64 = 0 ;
3+ pub const MINIMUM_HEIGHT_SUPPORTED : u64 = 0 ;
Original file line number Diff line number Diff line change @@ -276,9 +276,7 @@ fn verify_voters(
276276mod test {
277277 use crate :: errors:: Error ;
278278
279- use crate :: header:: eth_header:: {
280- get_validator_bytes_and_turn_length, ETHHeader ,
281- } ;
279+ use crate :: header:: eth_header:: { get_validator_bytes_and_turn_length, ETHHeader } ;
282280 use crate :: header:: eth_headers:: { verify_voters, ETHHeaders } ;
283281
284282 use crate :: fixture:: * ;
You can’t perform that action at this time.
0 commit comments