(cherry picked from commit a8ef29df27
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
This commit is contained in:
@ -896,7 +896,12 @@ impl JsonRpcRequestProcessor {
|
||||
self.check_slot_cleaned_up(&result, slot)?;
|
||||
Ok(result.ok().unwrap_or(None))
|
||||
} else {
|
||||
Err(RpcCustomError::BlockNotAvailable { slot }.into())
|
||||
let r_bank_forks = self.bank_forks.read().unwrap();
|
||||
if let Some(bank) = r_bank_forks.get(slot) {
|
||||
Ok(Some(bank.clock().unix_timestamp))
|
||||
} else {
|
||||
Err(RpcCustomError::BlockNotAvailable { slot }.into())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -378,7 +378,7 @@ Result:
|
||||
|
||||
### getBlockTime
|
||||
|
||||
Returns the estimated production time of a confirmed block.
|
||||
Returns the estimated production time of a block.
|
||||
|
||||
Each validator reports their UTC time to the ledger on a regular interval by
|
||||
intermittently adding a timestamp to a Vote for a particular block. A requested
|
||||
|
Reference in New Issue
Block a user