Documentation ¶
Index ¶
- Constants
- func GetPlugin(c consensus_pbft.Stack) consensus_pbft.Consenter
- func New(stack consensus_pbft.Stack) consensus_pbft.Consenter
- func NewValidatorIdentify(stack consensus_pbft.Stack) consensusInterface.ValidatorIdentifyInterface
- type NetValidator
- func (nv *NetValidator) GetValidatorID(handle *pbftTypes.PeerID) (pbftTypes.ReplicaID, error)
- func (nv *NetValidator) GetValidatorNode(id pbftTypes.ReplicaID) (pbftTypes.Peer, error)
- func (nv *NetValidator) GetValidatorNodeId(id pbftTypes.ReplicaID) (*pbftTypes.PeerID, error)
- func (nv *NetValidator) GetValidatorNodeIds(ids []pbftTypes.ReplicaID) ([]*pbftTypes.PeerID, error)
- func (nv *NetValidator) GetValidatorNodes(ids []pbftTypes.ReplicaID) ([]pbftTypes.Peer, error)
- type PbftIdentify
- func (pi *PbftIdentify) GetValidatorID(handle *pbftTypes.PeerID) (pbftTypes.ReplicaID, error)
- func (pi *PbftIdentify) GetValidatorNode(id pbftTypes.ReplicaID) (pbftTypes.Peer, error)
- func (pi *PbftIdentify) GetValidatorNodeId(id pbftTypes.ReplicaID) (*pbftTypes.PeerID, error)
- func (pi *PbftIdentify) GetValidatorNodeIds(ids []pbftTypes.ReplicaID) ([]*pbftTypes.PeerID, error)
- func (pi *PbftIdentify) GetValidatorNodes(ids []pbftTypes.ReplicaID) ([]pbftTypes.Peer, error)
- type PbftInfo
- type PbftPeer
- type ValidatorIndexer
Constants ¶
View Source
const ( // UnreasonableTimeout is an ugly thing, we need to create timers, then stop them before they expire, so use a large timeout UnreasonableTimeout = 100 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func GetPlugin ¶
func GetPlugin(c consensus_pbft.Stack) consensus_pbft.Consenter
GetPlugin returns the handle to the Consenter singleton
func New ¶
func New(stack consensus_pbft.Stack) consensus_pbft.Consenter
调用controller获取一个plugin,当选择是pbft算法时,它会调用pbft.go 里的 GetPlugin(c consensus.Stack)方法, 在pbft.go里面把所有的外部参数读进算法内部。 New creates a new Obc* instance that provides the Consenter interface. Internally, it uses an opaque pbft-core instance.
func NewValidatorIdentify ¶
func NewValidatorIdentify(stack consensus_pbft.Stack) consensusInterface.ValidatorIdentifyInterface
Types ¶
type NetValidator ¶
type NetValidator struct {
// contains filtered or unexported fields
}
func (*NetValidator) GetValidatorID ¶
func (*NetValidator) GetValidatorNode ¶
func (*NetValidator) GetValidatorNodeId ¶
func (*NetValidator) GetValidatorNodeIds ¶
func (*NetValidator) GetValidatorNodes ¶
type PbftIdentify ¶
type PbftIdentify struct {
// contains filtered or unexported fields
}
func (*PbftIdentify) GetValidatorID ¶
func (*PbftIdentify) GetValidatorNode ¶
func (*PbftIdentify) GetValidatorNodeId ¶
func (*PbftIdentify) GetValidatorNodeIds ¶
func (*PbftIdentify) GetValidatorNodes ¶
Click to show internal directories.
Click to hide internal directories.