MCPcopy Create free account
hub / github.com/CPChain/chain / RNode

Method RNode

protocols/cpc/api_backend.go:252–258  ·  view source on GitHub ↗

RNode returns current RNode information

()

Source from the content-addressed store, hash-verified

250
251// RNode returns current RNode information
252func (b *APIBackend) RNode() ([]common.Address, uint64) {
253 block := b.cpc.blockchain.CurrentBlock()
254 bn := block.Number()
255 api := b.cpc.engine.(*dpor.Dpor).APIs(b.cpc.blockchain)
256 rNodes, _ := api[0].Service.(*dpor.API).GetRNodes()
257 return rNodes, bn.Uint64()
258}
259
260// CurrentProposerIndex return current proposer index, (0,1,...,11)
261func (b *APIBackend) CurrentProposerIndex() uint64 {

Callers

nothing calls this directly

Calls 5

Uint64Method · 0.80
CurrentBlockMethod · 0.65
APIsMethod · 0.65
GetRNodesMethod · 0.65
NumberMethod · 0.45

Tested by

no test coverage detected