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

Method LoadRootChainOrderBook

controller/controller.go:217–219  ·  view source on GitHub ↗

LoadRootChainOrderBook() gets the order book from the root-chain

(rootChainId, rootHeight uint64)

Source from the content-addressed store, hash-verified

215
216// LoadRootChainOrderBook() gets the order book from the root-chain
217func (c *Controller) LoadRootChainOrderBook(rootChainId, rootHeight uint64) (*lib.OrderBook, lib.ErrorI) {
218 return c.RCManager.GetOrders(rootChainId, rootHeight, c.Config.ChainId)
219}
220
221// GetRootChainLotteryWinner() gets the pseudorandomly selected delegate to reward and their cut
222func (c *Controller) GetRootChainLotteryWinner(fsm *fsm.StateMachine, rootHeight uint64) (winner *lib.LotteryWinner, err lib.ErrorI) {

Callers 1

HandleSwapsMethod · 0.95

Calls 1

GetOrdersMethod · 0.65

Tested by

no test coverage detected