Documentation ¶
Index ¶
- type AddValidatorEvent
- type BlockSignature
- type CbftResult
- type ProducerState
- type RemoveValidatorEvent
- type SortedValidatorNode
- type UpdateChainStateFn
- type UpdateValidatorEvent
- type ValidateNode
- type ValidateNodeMap
- type Validators
- func (vs *Validators) Equal(rsh *Validators) bool
- func (vs *Validators) FindNodeByAddress(addr common.Address) (*ValidateNode, error)
- func (vs *Validators) FindNodeByID(id discover.NodeID) (*ValidateNode, error)
- func (vs *Validators) FindNodeByIndex(index int) (*ValidateNode, error)
- func (vs *Validators) Index(nodeID discover.NodeID) (uint32, error)
- func (vs *Validators) Len() int
- func (vs *Validators) NodeID(idx int) discover.NodeID
- func (vs *Validators) NodeList() []discover.NodeID
- func (vs *Validators) NodeListByBitArray(vSet *utils.BitArray) ([]*ValidateNode, error)
- func (vs *Validators) NodeListByIndexes(indexes []uint32) ([]*ValidateNode, error)
- func (vs *Validators) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddValidatorEvent ¶
type BlockSignature ¶
type BlockSignature struct { SignHash common.Hash // Signature hash,header[0:32] Hash common.Hash // Block hash,header[:] Number *big.Int Signature *common.BlockConfirmSign }
Block's Signature info
func (*BlockSignature) Copy ¶
func (bs *BlockSignature) Copy() *BlockSignature
type CbftResult ¶
type ProducerState ¶
type ProducerState struct {
// contains filtered or unexported fields
}
func (*ProducerState) Add ¶
func (ps *ProducerState) Add(miner common.Address)
func (*ProducerState) Validate ¶
func (ps *ProducerState) Validate(period int) bool
type RemoveValidatorEvent ¶
type SortedValidatorNode ¶ added in v0.7.1
type SortedValidatorNode []*ValidateNode
func (SortedValidatorNode) Len ¶ added in v0.7.1
func (sv SortedValidatorNode) Len() int
func (SortedValidatorNode) Less ¶ added in v0.7.1
func (sv SortedValidatorNode) Less(i, j int) bool
func (SortedValidatorNode) Swap ¶ added in v0.7.1
func (sv SortedValidatorNode) Swap(i, j int)
type UpdateChainStateFn ¶ added in v0.7.1
type UpdateValidatorEvent ¶
type UpdateValidatorEvent struct{}
type ValidateNode ¶ added in v0.7.1
type ValidateNode struct { Index uint32 `json:"index"` Address common.Address `json:"-"` PubKey *ecdsa.PublicKey `json:"pubKey"` NodeID discover.NodeID BlsPubKey *bls.PublicKey `json:"blsPubKey"` }
func (*ValidateNode) String ¶ added in v0.7.1
func (vn *ValidateNode) String() string
func (*ValidateNode) Verify ¶ added in v0.7.1
func (vn *ValidateNode) Verify(data, sign []byte) error
type ValidateNodeMap ¶ added in v0.7.1
type ValidateNodeMap map[discover.NodeID]*ValidateNode
func (ValidateNodeMap) String ¶ added in v0.7.1
func (vnm ValidateNodeMap) String() string
type Validators ¶ added in v0.7.1
type Validators struct { Nodes ValidateNodeMap `json:"validateNodes"` ValidBlockNumber uint64 `json:"-"` // contains filtered or unexported fields }
func (*Validators) Equal ¶ added in v0.7.1
func (vs *Validators) Equal(rsh *Validators) bool
func (*Validators) FindNodeByAddress ¶ added in v0.7.1
func (vs *Validators) FindNodeByAddress(addr common.Address) (*ValidateNode, error)
func (*Validators) FindNodeByID ¶ added in v0.7.1
func (vs *Validators) FindNodeByID(id discover.NodeID) (*ValidateNode, error)
func (*Validators) FindNodeByIndex ¶ added in v0.7.1
func (vs *Validators) FindNodeByIndex(index int) (*ValidateNode, error)
func (*Validators) Index ¶ added in v0.7.1
func (vs *Validators) Index(nodeID discover.NodeID) (uint32, error)
func (*Validators) Len ¶ added in v0.7.1
func (vs *Validators) Len() int
func (*Validators) NodeList ¶ added in v0.7.1
func (vs *Validators) NodeList() []discover.NodeID
func (*Validators) NodeListByBitArray ¶ added in v0.7.1
func (vs *Validators) NodeListByBitArray(vSet *utils.BitArray) ([]*ValidateNode, error)
func (*Validators) NodeListByIndexes ¶ added in v0.7.1
func (vs *Validators) NodeListByIndexes(indexes []uint32) ([]*ValidateNode, error)
func (*Validators) String ¶ added in v0.7.1
func (vs *Validators) String() string
Click to show internal directories.
Click to hide internal directories.