MCPcopy Create free account
hub / github.com/chain/txvm / Height

Method Height

protocol/protocol.go:180–184  ·  view source on GitHub ↗

Height returns the current height of the blockchain.

()

Source from the content-addressed store, hash-verified

178
179// Height returns the current height of the blockchain.
180func (c *Chain) Height() uint64 {
181 c.state.cond.L.Lock()
182 defer c.state.cond.L.Unlock()
183 return c.state.height
184}
185
186// State returns the most recent state available. It will not be current
187// unless the current process is the leader. Callers should examine the

Callers 5

TestNewChainHeightFunction · 0.95
setStateMethod · 0.95
TestGetBlockFunction · 0.95
queueSnapshotMethod · 0.95
TestMakeBlockFunction · 0.95

Calls

no outgoing calls

Tested by 3

TestNewChainHeightFunction · 0.76
TestGetBlockFunction · 0.76
TestMakeBlockFunction · 0.76