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 ¶
type SortedValidatorNode []*ValidateNode
func (SortedValidatorNode) Len ¶
func (sv SortedValidatorNode) Len() int
func (SortedValidatorNode) Less ¶
func (sv SortedValidatorNode) Less(i, j int) bool
func (SortedValidatorNode) Swap ¶
func (sv SortedValidatorNode) Swap(i, j int)
type UpdateChainStateFn ¶
type UpdateValidatorEvent ¶
type UpdateValidatorEvent struct{}
type ValidateNode ¶
type ValidateNode struct { Index uint32 `json:"index"` Address common.Address `json:"address"` PubKey *ecdsa.PublicKey `json:"-"` NodeID discover.NodeID `json:"nodeID"` BlsPubKey *bls.PublicKey `json:"blsPubKey"` }
func (*ValidateNode) String ¶
func (vn *ValidateNode) String() string
func (*ValidateNode) Verify ¶
func (vn *ValidateNode) Verify(data, sign []byte) error
type ValidateNodeMap ¶
type ValidateNodeMap map[discover.NodeID]*ValidateNode
func (ValidateNodeMap) String ¶
func (vnm ValidateNodeMap) String() string
type Validators ¶
type Validators struct { Nodes ValidateNodeMap `json:"validateNodes"` ValidBlockNumber uint64 `json:"validateBlockNumber"` // contains filtered or unexported fields }
func (*Validators) Equal ¶
func (vs *Validators) Equal(rsh *Validators) bool
func (*Validators) FindNodeByAddress ¶
func (vs *Validators) FindNodeByAddress(addr common.Address) (*ValidateNode, error)
func (*Validators) FindNodeByID ¶
func (vs *Validators) FindNodeByID(id discover.NodeID) (*ValidateNode, error)
func (*Validators) FindNodeByIndex ¶
func (vs *Validators) FindNodeByIndex(index int) (*ValidateNode, error)
func (*Validators) Len ¶
func (vs *Validators) Len() int
func (*Validators) NodeList ¶
func (vs *Validators) NodeList() []discover.NodeID
func (*Validators) NodeListByBitArray ¶
func (vs *Validators) NodeListByBitArray(vSet *utils.BitArray) ([]*ValidateNode, error)
func (*Validators) NodeListByIndexes ¶
func (vs *Validators) NodeListByIndexes(indexes []uint32) ([]*ValidateNode, error)
func (*Validators) String ¶
func (vs *Validators) String() string
Click to show internal directories.
Click to hide internal directories.