Documentation ¶
Overview ¶
Package bftview implements Cypherium committee common operation functions.
Index ¶
- Constants
- func DeleteCommittee(keyBlockNumber uint64, hash common.Hash)
- func DeleteMember(kNumber uint64, hash common.Hash)
- func GetMemberIndex(pubKey string) int
- func GetNodeID(addr string, pub string) string
- func GetServerCommitteeLen() int
- func GetServerInfo(infoType ServerInfoType) string
- func IamLeader(leaderIndex uint) bool
- func IamMember() int
- func IamMemberByNumber(kNumber uint64, hash common.Hash) bool
- func SetCommitteeConfig(db cphdb.Database, keyblockchain KeyBlockChainInterface, ...)
- func SetServerInfo(address, pubKey string)
- func StrToBlsPrivKey(s string) *bls.SecretKey
- func StrToBlsPubKey(s string) *bls.PublicKey
- func ToBlsPublicKeys(hash common.Hash) []*bls.PublicKey
- func WriteCommittee(keyBlockNumber uint64, hash common.Hash, cm *Committee) bool
- type Committee
- func (committee *Committee) Add(r *common.Cnode, leaderIndex int, outAddress string) *common.Cnode
- func (committee *Committee) Copy() *Committee
- func (committee *Committee) Get(key string, findType ServerInfoType) (*common.Cnode, int)
- func (committee *Committee) HasIP() bool
- func (committee *Committee) In() *common.Cnode
- func (committee *Committee) Leader() *common.Cnode
- func (committee *Committee) RlpHash() (h common.Hash)
- func (committee *Committee) Store(keyblock *types.KeyBlock) bool
- func (committee *Committee) Store0(keyblock *types.KeyBlock) bool
- func (committee *Committee) ToBlsPublicKeys(hash common.Hash) []*bls.PublicKey
- type CommitteeConfig
- type KeyBlockChainInterface
- type ServerInfo
- type ServerInfoType
- type ServiceInterface
- type View
- type ViewExt
Constants ¶
View Source
const CommitteeCacheSize = 10
Variables ¶
This section is empty.
Functions ¶
func DeleteCommittee ¶
func DeleteMember ¶
func GetMemberIndex ¶
func GetServerCommitteeLen ¶
func GetServerCommitteeLen() int
func GetServerInfo ¶
func GetServerInfo(infoType ServerInfoType) string
func SetCommitteeConfig ¶
func SetCommitteeConfig(db cphdb.Database, keyblockchain KeyBlockChainInterface, service ServiceInterface)
func SetServerInfo ¶
func SetServerInfo(address, pubKey string)
func StrToBlsPrivKey ¶
func StrToBlsPubKey ¶
func ToBlsPublicKeys ¶
------Tools---------------------------------------------------------------------------------------------------------
Types ¶
type Committee ¶
type Committee []*common.Cnode
func GetCommittee ¶
func GetCurrentMember ¶
func GetCurrentMember() *Committee
func LoadMember ¶
load committee by keyblock number, needIP is for ignore ip address
func ReadCommittee ¶
ReadCommittee retrieves the committee.
type CommitteeConfig ¶
type CommitteeConfig struct {
// contains filtered or unexported fields
}
type KeyBlockChainInterface ¶
type ServerInfo ¶
type ServerInfo struct {
// contains filtered or unexported fields
}
type ServerInfoType ¶
type ServerInfoType int
const ( PublicKey ServerInfoType = iota PrivateKey Address ID )
type ServiceInterface ¶
Click to show internal directories.
Click to hide internal directories.