MCPcopy Create free account
hub / github.com/canopy-network/canopy / LoadIsOwnRoot

Method LoadIsOwnRoot

controller/controller.go:308–318  ·  view source on GitHub ↗

INTERNAL CALLS BELOW LoadIsOwnRoot() returns if this chain is its own root (base)

()

Source from the content-addressed store, hash-verified

306
307// LoadIsOwnRoot() returns if this chain is its own root (base)
308func (c *Controller) LoadIsOwnRoot() (isOwnRoot bool) {
309 // use the state machine to check if this chain is the root chain
310 isOwnRoot, err := c.FSM.LoadIsOwnRoot()
311 // if an error occurred
312 if err != nil {
313 // log the error
314 c.log.Error(err.Error())
315 }
316 // exit
317 return
318}
319
320// RootChainId() returns the root chain id according to the FSM
321func (c *Controller) LoadRootChainId(height uint64) (rootChainId uint64) {

Callers

nothing calls this directly

Calls 2

LoadIsOwnRootMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected