process_get_epoch_info resulting in duration value underflow (#31712)

This commit is contained in:
Saad Talaat 2023-05-19 02:08:14 +03:00 committed by GitHub
parent 936d2cf3c2
commit 08bb6f7070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1131,7 +1131,7 @@ pub fn process_get_epoch_info(rpc_client: &RpcClient, config: &CliConfig) -> Pro
.get_block_time(first_block_in_epoch)
.ok()
.map(|time| {
time + (((first_block_in_epoch - epoch_expected_start_slot)
time - (((first_block_in_epoch - epoch_expected_start_slot)
* average_slot_time_ms)
/ 1000) as i64
});