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

Method Validators

protocols/cpc/api_backend.go:339–342  ·  view source on GitHub ↗

Validators returns current block Validators information

(blockNr rpc.BlockNumber)

Source from the content-addressed store, hash-verified

337
338// Validators returns current block Validators information
339func (b *APIBackend) Validators(blockNr rpc.BlockNumber) ([]common.Address, error) {
340 api := b.cpc.engine.(*dpor.Dpor).APIs(b.cpc.blockchain)
341 return api[0].Service.(*dpor.API).GetValidators(blockNr)
342}
343
344func (b *APIBackend) SupportPrivateTx(ctx context.Context) (bool, error) {
345 return types.SupportTxType(types.PrivateTx), nil

Callers

nothing calls this directly

Calls 2

GetValidatorsMethod · 0.80
APIsMethod · 0.65

Tested by

no test coverage detected