MCPcopy
hub / github.com/canopy-network/canopy / LoadRootChainId

Method LoadRootChainId

controller/controller.go:321–331  ·  view source on GitHub ↗

RootChainId() returns the root chain id according to the FSM

(height uint64)

Source from the content-addressed store, hash-verified

319
320// RootChainId() returns the root chain id according to the FSM
321func (c *Controller) LoadRootChainId(height uint64) (rootChainId uint64) {
322 // use the state machine to get the root chain id
323 rootChainId, err := c.FSM.LoadRootChainId(height)
324 // if an error occurred
325 if err != nil {
326 // log the error
327 c.log.Error(err.Error())
328 }
329 // exit
330 return
331}
332
333// LoadCertificate() gets the certificate for from the indexer at a specific height
334func (c *Controller) LoadCertificate(height uint64) (*lib.QuorumCertificate, lib.ErrorI) {

Callers 3

HandlePeerBlockMethod · 0.95

Calls 2

LoadRootChainIdMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected