Versions in this module Expand all Collapse all v1 v1.9.2 Aug 23, 2019 v1.9.0 Jul 31, 2019 Changes in this version + var DefaultConfig = &Config + var ErrStartedEngine = errors.New("started engine") + var ErrStoppedEngine = errors.New("stopped engine") + var ErrUnauthorizedAddress = errors.New("unauthorized address") + func CheckFullnodeSignature(fullnodeSet FullnodeSet, data []byte, sig []byte) (common.Address, error) + func GetSignatureAddress(data []byte, sig []byte) (common.Address, error) + func RLPHash(v interface{}) (h common.Hash) + type Backend interface + Address func() common.Address + Broadcast func(fullnodeSet FullnodeSet, payload []byte) error + CheckSignature func(data []byte, addr common.Address, sig []byte) error + Close func() error + Commit func(blockproposal BlockProposal, seals [][]byte) error + EventMux func() *event.TypeMux + Fullnodes func(blockproposal BlockProposal) FullnodeSet + GetSpeaker func(number uint64) common.Address + Gossip func(fullnodeSet FullnodeSet, payload []byte) error + HasBadBlockProposal func(hash common.Hash) bool + HasBlockProposal func(hash common.Hash, number *big.Int) bool + LastBlockProposal func() (BlockProposal, common.Address) + ParentFullnodes func(proposal BlockProposal) FullnodeSet + Sign func([]byte) ([]byte, error) + Verify func(BlockProposal) (time.Duration, error) + type BlockProposal interface + DecodeRLP func(s *rlp.Stream) error + EncodeRLP func(w io.Writer) error + Hash func() common.Hash + Number func() *big.Int + String func() string + type BlockProposalSelector func(FullnodeSet, common.Address, uint64) Fullnode + type Config struct + BlockPeriod uint64 + CommunityAddress string + DataDir string + Epoch uint64 + MaxTimeout uint64 + MinBlocksEmptyMining *big.Int + MinFunds int64 + RequestTimeout uint64 + SpeakerPolicy SpeakerPolicy + type FinalCommittedEvent struct + type Fullnode interface + Address func() common.Address + String func() string + type FullnodeSet interface + AddFullnode func(address common.Address) bool + CalcSpeaker func(lastSpeaker common.Address, round uint64) + Copy func() FullnodeSet + E func() int + GetByAddress func(addr common.Address) (int, Fullnode) + GetByIndex func(i uint64) Fullnode + GetSpeaker func() Fullnode + IsSpeaker func(address common.Address) bool + List func() []Fullnode + MaxFaulty func() int + MinApprovers func() int + Policy func() SpeakerPolicy + RemoveFullnode func(address common.Address) bool + Size func() int + type Fullnodes []Fullnode + func (slice Fullnodes) Len() int + func (slice Fullnodes) Less(i, j int) bool + func (slice Fullnodes) Swap(i, j int) + type MessageEvent struct + Payload []byte + type Preprepare struct + BlockProposal BlockProposal + View *View + func (b *Preprepare) DecodeRLP(s *rlp.Stream) error + func (b *Preprepare) EncodeRLP(w io.Writer) error + type Request struct + BlockProposal BlockProposal + type RequestEvent struct + BlockProposal BlockProposal + type SpeakerPolicy uint64 + const RoundRobin + type Subject struct + Digest common.Hash + View *View + func (b *Subject) DecodeRLP(s *rlp.Stream) error + func (b *Subject) EncodeRLP(w io.Writer) error + func (b *Subject) String() string + type View struct + Round *big.Int + Sequence *big.Int + func (v *View) Cmp(y *View) int + func (v *View) DecodeRLP(s *rlp.Stream) error + func (v *View) EncodeRLP(w io.Writer) error + func (v *View) String() string