MCPcopy Create free account
hub / github.com/chain/Core / Time

Method Time

protocol/bc/legacy/block_header.go:42–45  ·  view source on GitHub ↗

Time returns the time represented by the Timestamp in bh.

()

Source from the content-addressed store, hash-verified

40
41// Time returns the time represented by the Timestamp in bh.
42func (bh *BlockHeader) Time() time.Time {
43 tsNano := bh.TimestampMS * uint64(time.Millisecond)
44 return time.Unix(0, int64(tsNano)).UTC()
45}
46
47func (bh *BlockHeader) Scan(val interface{}) error {
48 driverBuf, ok := val.([]byte)

Callers 7

RecoverMethod · 0.80
CommitAppliedBlockMethod · 0.80
TestEmptyBlockFunction · 0.80
insertAnnotatedTxsMethod · 0.80
indexAssetsMethod · 0.80
expireControlProgramsMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestEmptyBlockFunction · 0.64