From bcfb3ee794166b736482aedefce2c68591dec290 Mon Sep 17 00:00:00 2001 From: Slavomir Date: Thu, 1 Jul 2021 13:33:54 +0200 Subject: [PATCH] RPC/GetBlockTime: more comments --- rpc/getBlockTime.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpc/getBlockTime.go b/rpc/getBlockTime.go index 33f9406..f540190 100644 --- a/rpc/getBlockTime.go +++ b/rpc/getBlockTime.go @@ -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