Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cluster ¶
Cluster represents a cluster of block producers.
func NewCluster ¶
NewCluster returns a new bp.Cluster.
func (*Cluster) BpID2Index ¶
BpID2Index returns the index corresponding to id.
func (*Cluster) BpIndex2ID ¶
BpIndex2ID returns the ID corresponding to idx.
type ClusterMember ¶
ClusterMember is an interface which corresponds to BP member update.
type Snapshot ¶
Snapshot represents the set of the elected BP at refBlockNo.
func NewSnapshot ¶
NewSnapshot returns a Snapshot corresponding to blockNo and period.
type Snapshots ¶
type Snapshots struct {
// contains filtered or unexported fields
}
Snapshots is a map from block no to *Snapshot.
func NewSnapshots ¶
func NewSnapshots(c ClusterMember, cdb consensus.ChainDB, sdb *state.ChainStateDB) *Snapshots
NewSnapshots returns a new Snapshots.
func (*Snapshots) AddSnapshot ¶
AddSnapshot add a new BP list corresponding to refBlockNO to sn.
func (*Snapshots) NeedToRefresh ¶
NeedToRefresh reports whether blockNo corresponds to a BP regime change point.
Click to show internal directories.
Click to hide internal directories.