RPC/GetBlockTime: more comments

This commit is contained in:
Slavomir 2021-07-01 13:33:54 +02:00
parent 9d670a8a67
commit bcfb3ee794
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
)
// Estimated production time, as Unix timestamp (seconds since the Unix epoch)
type GetBlockTimeResult int64
// GetBlockTime returns the estimated production time of a block.
@ -12,6 +13,10 @@ type GetBlockTimeResult int64
// particular block. A requested block's time is calculated from
// the stake-weighted mean of the Vote timestamps in a set of
// recent blocks recorded on the ledger.
//
// The result will be an int64 estimated production time,
// as Unix timestamp (seconds since the Unix epoch),
// or nil if the timestamp is not available for this block.
func (cl *Client) GetBlockTime(
ctx context.Context,
block uint64, // block, identified by Slot