MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / heightOfTime

Method heightOfTime

blockproducer/chain.go:983–985  ·  view source on GitHub ↗

heightOfTime calculates the heightOfTime with this sql-chain config of a given time reading.

(t time.Time)

Source from the content-addressed store, hash-verified

981
982// heightOfTime calculates the heightOfTime with this sql-chain config of a given time reading.
983func (c *Chain) heightOfTime(t time.Time) uint32 {
984 return uint32(t.Sub(c.genesisTime) / c.period)
985}
986
987func (c *Chain) getRequiredConfirms() uint32 {
988 c.RLock()

Callers 4

syncHeadsMethod · 0.95
applyBlockMethod · 0.95
produceAndStoreBlockMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected