[−][src]Trait ckb_traits::BlockMedianTimeContext
The invoker should only rely on block_median_time
function
the other functions only use to help the default block_median_time
, and maybe unimplemented.
Required methods
fn median_block_count(&self) -> u64
Provided methods
fn timestamp_and_parent(
&self,
block_hash: &Byte32
) -> (u64, BlockNumber, Byte32)
&self,
block_hash: &Byte32
) -> (u64, BlockNumber, Byte32)
Return timestamp and block_number of the corresponding block_hash, and hash of parent block
fn block_median_time(&self, block_hash: &Byte32) -> u64
Return past block median time, including the timestamp of the given one