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

Method State

protocol/protocol.go:189–193  ·  view source on GitHub ↗

State returns the most recent state available. It will not be current unless the current process is the leader. Callers should examine the returned state header's height if they need to verify the current state.

()

Source from the content-addressed store, hash-verified

187// unless the current process is the leader. Callers should examine the
188// returned state header's height if they need to verify the current state.
189func (c *Chain) State() *state.Snapshot {
190 c.state.cond.L.Lock()
191 defer c.state.cond.L.Unlock()
192 return c.state.snapshot
193}
194
195func (c *Chain) setState(s *state.Snapshot) {
196 c.state.cond.L.Lock()

Callers 7

GenerateBlockMethod · 0.95
CommitAppliedBlockMethod · 0.95
CommitBlockMethod · 0.95
MakeBlockFunction · 0.80

Calls

no outgoing calls