bp

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	// contains filtered or unexported fields
}

Cluster represents a cluster of block producers.

func NewCluster

func NewCluster(ids []string, blockProducers uint16) (*Cluster, error)

NewCluster returns a new bp.Cluster.

func (*Cluster) BpID2Index

func (c *Cluster) BpID2Index(id peer.ID) (uint16, bool)

BpID2Index returns the index corresponding to id.

func (*Cluster) BpIndex2ID

func (c *Cluster) BpIndex2ID(idx uint16) (peer.ID, bool)

BpIndex2ID returns the ID correspinding to idx.

func (*Cluster) Has

func (c *Cluster) Has(id peer.ID) bool

Has reports whether c includes id or not

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL