Documentation ¶
Overview ¶
Package core is a generated GoMock package.
Index ¶
- Constants
- Variables
- func Encode(val interface{}) ([]byte, error)
- func New(backend Backend, config *config.Config) *core
- func NewRoundMessages() *roundMessages
- func PrepareCommittedSeal(hash common.Hash, round int64, height *big.Int) []byte
- type Backend
- type Changes
- type ConsensusMsg
- type Message
- func (m *Message) Decode(val interface{}) error
- func (m *Message) DecodeRLP(s *rlp.Stream) error
- func (m *Message) EncodeRLP(w io.Writer) error
- func (m *Message) FromPayload(b []byte, valSet committee.Set, ...) (*types.CommitteeMember, error)
- func (m *Message) GetCode() uint64
- func (m *Message) GetPower() uint64
- func (m *Message) GetSignature() []byte
- func (m *Message) Height() (*big.Int, error)
- func (m *Message) Payload() ([]byte, error)
- func (m *Message) PayloadNoSig() ([]byte, error)
- func (m *Message) Round() (int64, error)
- func (m *Message) String() string
- type MockBackend
- func (m *MockBackend) APIs(chain consensus.ChainReader) []rpc.API
- func (m *MockBackend) AddSeal(block *types.Block) (*types.Block, error)
- func (m *MockBackend) Address() common.Address
- func (m *MockBackend) AskSync(set committee.Set)
- func (m *MockBackend) Author(header *types.Header) (common.Address, error)
- func (m *MockBackend) Broadcast(ctx context.Context, valSet committee.Set, payload []byte) error
- func (m *MockBackend) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int
- func (m *MockBackend) CheckSignature(data []byte, addr common.Address, sig []byte) error
- func (m *MockBackend) Close() error
- func (m *MockBackend) Commit(proposalBlock *types.Block, round int64, seals [][]byte) error
- func (m *MockBackend) Committee(number uint64) (committee.Set, error)
- func (m *MockBackend) EXPECT() *MockBackendMockRecorder
- func (m *MockBackend) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) (types.Committee, *types.Receipt, error)
- func (m *MockBackend) FinalizeAndAssemble(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error)
- func (m *MockBackend) GetContractABI() string
- func (m *MockBackend) GetContractAddress() common.Address
- func (m *MockBackend) GetProposer(number uint64) common.Address
- func (m *MockBackend) Gossip(ctx context.Context, valSet committee.Set, payload []byte)
- func (m *MockBackend) HandleMsg(address common.Address, data p2p.Msg) (bool, error)
- func (m *MockBackend) HandleUnhandledMsgs(ctx context.Context)
- func (m *MockBackend) HasBadProposal(hash common.Hash) bool
- func (m *MockBackend) LastCommittedProposal() (*types.Block, common.Address)
- func (m *MockBackend) NewChainHead() error
- func (m *MockBackend) Post(ev interface{})
- func (m *MockBackend) Prepare(chain consensus.ChainReader, header *types.Header) error
- func (m *MockBackend) Protocol() (string, uint64)
- func (m *MockBackend) ResetPeerCache(address common.Address)
- func (m *MockBackend) Seal(chain consensus.ChainReader, block *types.Block, results chan<- *types.Block, ...) error
- func (m *MockBackend) SealHash(header *types.Header) common.Hash
- func (m *MockBackend) SetBroadcaster(arg0 consensus.Broadcaster)
- func (m *MockBackend) SetProposedBlockHash(hash common.Hash)
- func (m *MockBackend) Sign(arg0 []byte) ([]byte, error)
- func (m *MockBackend) Start(ctx context.Context, chain consensus.ChainReader, ...) error
- func (m *MockBackend) Subscribe(types ...interface{}) *event.TypeMuxSubscription
- func (m *MockBackend) SyncPeer(address common.Address, messages []*Message)
- func (m *MockBackend) VerifyHeader(chain consensus.ChainReader, header *types.Header, seal bool) error
- func (m *MockBackend) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error)
- func (m *MockBackend) VerifyProposal(arg0 types.Block) (time.Duration, error)
- func (m *MockBackend) VerifySeal(chain consensus.ChainReader, header *types.Header) error
- func (m *MockBackend) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
- func (m *MockBackend) WhiteList() []string
- type MockBackendMockRecorder
- func (mr *MockBackendMockRecorder) APIs(chain interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) AddSeal(block interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Address() *gomock.Call
- func (mr *MockBackendMockRecorder) AskSync(set interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Author(header interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Broadcast(ctx, valSet, payload interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) CalcDifficulty(chain, time, parent interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) CheckSignature(data, addr, sig interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Close() *gomock.Call
- func (mr *MockBackendMockRecorder) Commit(proposalBlock, round, seals interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Committee(number interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Finalize(chain, header, state, txs, uncles, receipts interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) FinalizeAndAssemble(chain, header, state, txs, uncles, receipts interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) GetContractABI() *gomock.Call
- func (mr *MockBackendMockRecorder) GetContractAddress() *gomock.Call
- func (mr *MockBackendMockRecorder) GetProposer(number interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Gossip(ctx, valSet, payload interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) HandleMsg(address, data interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) HandleUnhandledMsgs(ctx interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) HasBadProposal(hash interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) LastCommittedProposal() *gomock.Call
- func (mr *MockBackendMockRecorder) NewChainHead() *gomock.Call
- func (mr *MockBackendMockRecorder) Post(ev interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Prepare(chain, header interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Protocol() *gomock.Call
- func (mr *MockBackendMockRecorder) ResetPeerCache(address interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Seal(chain, block, results, stop interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) SealHash(header interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) SetBroadcaster(arg0 interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) SetProposedBlockHash(hash interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Sign(arg0 interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Start(ctx, chain, currentBlock, hasBadBlock interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Subscribe(types ...interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) SyncPeer(address, messages interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) VerifyHeader(chain, header, seal interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) VerifyHeaders(chain, headers, seals interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) VerifyProposal(arg0 interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) VerifySeal(chain, header interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) VerifyUncles(chain, block interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) WhiteList() *gomock.Call
- type Modifier
- type ModifyCommitteeEngine
- func (c ModifyCommitteeEngine) APIs(chain consensus.ChainReader) []rpc.API
- func (c ModifyCommitteeEngine) Author(header *types.Header) (common.Address, error)
- func (c ModifyCommitteeEngine) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int
- func (c ModifyCommitteeEngine) Close() error
- func (c ModifyCommitteeEngine) CommitteeSet() committee.Set
- func (c ModifyCommitteeEngine) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) (types.Committee, *types.Receipt, error)
- func (c *ModifyCommitteeEngine) FinalizeAndAssemble(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error)
- func (c ModifyCommitteeEngine) GetCurrentHeightMessages() []*Message
- func (c ModifyCommitteeEngine) HandleMsg(address common.Address, data p2p.Msg) (bool, error)
- func (c ModifyCommitteeEngine) Height() *big.Int
- func (c ModifyCommitteeEngine) IsMember(address common.Address) bool
- func (c ModifyCommitteeEngine) NewChainHead() error
- func (c ModifyCommitteeEngine) Prepare(chain consensus.ChainReader, header *types.Header) error
- func (c ModifyCommitteeEngine) Protocol() (protocolName string, extraMsgCodes uint64)
- func (c ModifyCommitteeEngine) ResetPeerCache(address common.Address)
- func (c ModifyCommitteeEngine) Round() int64
- func (c ModifyCommitteeEngine) Seal(chain consensus.ChainReader, block *types.Block, results chan<- *types.Block, ...) error
- func (c ModifyCommitteeEngine) SealHash(header *types.Header) common.Hash
- func (c ModifyCommitteeEngine) SetBroadcaster(b consensus.Broadcaster)
- func (c ModifyCommitteeEngine) Start(ctx context.Context, chain consensus.ChainReader, ...) error
- func (c ModifyCommitteeEngine) Stop() error
- func (c ModifyCommitteeEngine) SyncPeer(address common.Address)
- func (*ModifyCommitteeEngine) VerifyHeader(_ consensus.ChainReader, _ *types.Header, _ bool) error
- func (c ModifyCommitteeEngine) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error)
- func (c ModifyCommitteeEngine) VerifySeal(chain consensus.ChainReader, header *types.Header) error
- func (c ModifyCommitteeEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
- type Proposal
- type Step
- type TimeoutEvent
- type VerifySelfProposalAlwaysTrueBackend
- type Vote
Constants ¶
const (
MaxRound = 99 // consequence of backlog priority
)
Variables ¶
Functions ¶
func NewRoundMessages ¶ added in v0.4.0
func NewRoundMessages() *roundMessages
NewRoundMessages creates a new messages instance with the given view and validatorSet we need to keep a reference of proposal in order to propose locked proposal when there is a lock and itself is the proposer
Types ¶
type Backend ¶ added in v0.1.6
type Backend interface { consensus.Engine consensus.Handler Start(ctx context.Context, chain consensus.ChainReader, currentBlock func() *types.Block, hasBadBlock func(hash common.Hash) bool) error // Address returns the owner's address Address() common.Address // Validators returns the committee set Committee(number uint64) (committee.Set, error) Subscribe(types ...interface{}) *event.TypeMuxSubscription Post(ev interface{}) // Broadcast sends a message to all validators (include self) Broadcast(ctx context.Context, valSet committee.Set, payload []byte) error // Gossip sends a message to all validators (exclude self) Gossip(ctx context.Context, valSet committee.Set, payload []byte) // Commit delivers an approved proposal to backend. // The delivered proposal will be put into blockchain. Commit(proposalBlock *types.Block, round int64, seals [][]byte) error // VerifyProposal verifies the proposal. If a consensus.ErrFutureBlock error is returned, // the time difference of the proposal and current time is also returned. VerifyProposal(types.Block) (time.Duration, error) // Sign signs input data with the backend's private key Sign([]byte) ([]byte, error) // CheckSignature verifies the signature by checking if it's signed by // the given validator CheckSignature(data []byte, addr common.Address, sig []byte) error // LastCommittedProposal retrieves latest committed proposal and the address of proposer LastCommittedProposal() (*types.Block, common.Address) // GetProposer returns the proposer of the given block height GetProposer(number uint64) common.Address // HasBadBlock returns whether the block with the hash is a bad block HasBadProposal(hash common.Hash) bool // Setter for proposed block hash SetProposedBlockHash(hash common.Hash) AddSeal(block *types.Block) (*types.Block, error) SyncPeer(address common.Address, messages []*Message) ResetPeerCache(address common.Address) AskSync(set committee.Set) HandleUnhandledMsgs(ctx context.Context) GetContractAddress() common.Address GetContractABI() string WhiteList() []string }
Backend provides application specific functions for Istanbul core
type Changes ¶ added in v0.4.0
type Changes struct {
// contains filtered or unexported fields
}
func NewChanges ¶ added in v0.4.0
func NewChanges() Changes
type ConsensusMsg ¶ added in v0.4.0
type Message ¶ added in v0.1.6
type Message struct { Code uint64 Msg []byte Address common.Address Signature []byte CommittedSeal []byte // contains filtered or unexported fields }
func (*Message) DecodeRLP ¶ added in v0.1.6
DecodeRLP implements rlp.Decoder, and load the consensus fields from a RLP stream.
func (*Message) FromPayload ¶ added in v0.1.6
func (*Message) GetSignature ¶ added in v0.1.6
func (*Message) PayloadNoSig ¶ added in v0.1.6
type MockBackend ¶ added in v0.1.6
type MockBackend struct {
// contains filtered or unexported fields
}
MockBackend is a mock of Backend interface
func NewMockBackend ¶ added in v0.1.6
func NewMockBackend(ctrl *gomock.Controller) *MockBackend
NewMockBackend creates a new mock instance
func (*MockBackend) APIs ¶ added in v0.1.6
func (m *MockBackend) APIs(chain consensus.ChainReader) []rpc.API
APIs mocks base method
func (*MockBackend) Address ¶ added in v0.1.6
func (m *MockBackend) Address() common.Address
Address mocks base method
func (*MockBackend) AskSync ¶ added in v0.3.0
func (m *MockBackend) AskSync(set committee.Set)
AskSync mocks base method
func (*MockBackend) CalcDifficulty ¶ added in v0.1.6
func (m *MockBackend) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int
CalcDifficulty mocks base method
func (*MockBackend) CheckSignature ¶ added in v0.1.6
CheckSignature mocks base method
func (*MockBackend) Close ¶ added in v0.1.6
func (m *MockBackend) Close() error
Close mocks base method
func (*MockBackend) Committee ¶ added in v0.4.0
func (m *MockBackend) Committee(number uint64) (committee.Set, error)
Committee mocks base method
func (*MockBackend) EXPECT ¶ added in v0.1.6
func (m *MockBackend) EXPECT() *MockBackendMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockBackend) Finalize ¶ added in v0.1.6
func (m *MockBackend) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) (types.Committee, *types.Receipt, error)
Finalize mocks base method
func (*MockBackend) FinalizeAndAssemble ¶ added in v0.1.6
func (m *MockBackend) FinalizeAndAssemble(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts *[]*types.Receipt) (*types.Block, error)
FinalizeAndAssemble mocks base method
func (*MockBackend) GetContractABI ¶ added in v0.3.0
func (m *MockBackend) GetContractABI() string
GetContractABI mocks base method
func (*MockBackend) GetContractAddress ¶ added in v0.3.0
func (m *MockBackend) GetContractAddress() common.Address
GetContractAddress mocks base method
func (*MockBackend) GetProposer ¶ added in v0.1.6
func (m *MockBackend) GetProposer(number uint64) common.Address
GetProposer mocks base method
func (*MockBackend) HandleUnhandledMsgs ¶ added in v0.3.0
func (m *MockBackend) HandleUnhandledMsgs(ctx context.Context)
HandleUnhandledMsgs mocks base method
func (*MockBackend) HasBadProposal ¶ added in v0.1.6
func (m *MockBackend) HasBadProposal(hash common.Hash) bool
HasBadProposal mocks base method
func (*MockBackend) LastCommittedProposal ¶ added in v0.1.6
func (m *MockBackend) LastCommittedProposal() (*types.Block, common.Address)
LastCommittedProposal mocks base method
func (*MockBackend) NewChainHead ¶ added in v0.1.6
func (m *MockBackend) NewChainHead() error
NewChainHead mocks base method
func (*MockBackend) Post ¶ added in v0.1.6
func (m *MockBackend) Post(ev interface{})
Post mocks base method
func (*MockBackend) Prepare ¶ added in v0.1.6
func (m *MockBackend) Prepare(chain consensus.ChainReader, header *types.Header) error
Prepare mocks base method
func (*MockBackend) Protocol ¶ added in v0.1.6
func (m *MockBackend) Protocol() (string, uint64)
Protocol mocks base method
func (*MockBackend) ResetPeerCache ¶ added in v0.1.6
func (m *MockBackend) ResetPeerCache(address common.Address)
ResetPeerCache mocks base method
func (*MockBackend) Seal ¶ added in v0.1.6
func (m *MockBackend) Seal(chain consensus.ChainReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error
Seal mocks base method
func (*MockBackend) SealHash ¶ added in v0.1.6
func (m *MockBackend) SealHash(header *types.Header) common.Hash
SealHash mocks base method
func (*MockBackend) SetBroadcaster ¶ added in v0.1.6
func (m *MockBackend) SetBroadcaster(arg0 consensus.Broadcaster)
SetBroadcaster mocks base method
func (*MockBackend) SetProposedBlockHash ¶ added in v0.1.6
func (m *MockBackend) SetProposedBlockHash(hash common.Hash)
SetProposedBlockHash mocks base method
func (*MockBackend) Sign ¶ added in v0.1.6
func (m *MockBackend) Sign(arg0 []byte) ([]byte, error)
Sign mocks base method
func (*MockBackend) Start ¶ added in v0.1.6
func (m *MockBackend) Start(ctx context.Context, chain consensus.ChainReader, currentBlock func() *types.Block, hasBadBlock func(common.Hash) bool) error
Start mocks base method
func (*MockBackend) Subscribe ¶ added in v0.1.6
func (m *MockBackend) Subscribe(types ...interface{}) *event.TypeMuxSubscription
Subscribe mocks base method
func (*MockBackend) SyncPeer ¶ added in v0.1.6
func (m *MockBackend) SyncPeer(address common.Address, messages []*Message)
SyncPeer mocks base method
func (*MockBackend) VerifyHeader ¶ added in v0.1.6
func (m *MockBackend) VerifyHeader(chain consensus.ChainReader, header *types.Header, seal bool) error
VerifyHeader mocks base method
func (*MockBackend) VerifyHeaders ¶ added in v0.1.6
func (m *MockBackend) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error)
VerifyHeaders mocks base method
func (*MockBackend) VerifyProposal ¶ added in v0.1.6
VerifyProposal mocks base method
func (*MockBackend) VerifySeal ¶ added in v0.1.6
func (m *MockBackend) VerifySeal(chain consensus.ChainReader, header *types.Header) error
VerifySeal mocks base method
func (*MockBackend) VerifyUncles ¶ added in v0.1.6
func (m *MockBackend) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
VerifyUncles mocks base method
func (*MockBackend) WhiteList ¶ added in v0.3.0
func (m *MockBackend) WhiteList() []string
WhiteList mocks base method
type MockBackendMockRecorder ¶ added in v0.1.6
type MockBackendMockRecorder struct {
// contains filtered or unexported fields
}
MockBackendMockRecorder is the mock recorder for MockBackend
func (*MockBackendMockRecorder) APIs ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) APIs(chain interface{}) *gomock.Call
APIs indicates an expected call of APIs
func (*MockBackendMockRecorder) AddSeal ¶ added in v0.4.0
func (mr *MockBackendMockRecorder) AddSeal(block interface{}) *gomock.Call
AddSeal indicates an expected call of AddSeal
func (*MockBackendMockRecorder) Address ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Address() *gomock.Call
Address indicates an expected call of Address
func (*MockBackendMockRecorder) AskSync ¶ added in v0.3.0
func (mr *MockBackendMockRecorder) AskSync(set interface{}) *gomock.Call
AskSync indicates an expected call of AskSync
func (*MockBackendMockRecorder) Author ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Author(header interface{}) *gomock.Call
Author indicates an expected call of Author
func (*MockBackendMockRecorder) Broadcast ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Broadcast(ctx, valSet, payload interface{}) *gomock.Call
Broadcast indicates an expected call of Broadcast
func (*MockBackendMockRecorder) CalcDifficulty ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) CalcDifficulty(chain, time, parent interface{}) *gomock.Call
CalcDifficulty indicates an expected call of CalcDifficulty
func (*MockBackendMockRecorder) CheckSignature ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) CheckSignature(data, addr, sig interface{}) *gomock.Call
CheckSignature indicates an expected call of CheckSignature
func (*MockBackendMockRecorder) Close ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockBackendMockRecorder) Commit ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Commit(proposalBlock, round, seals interface{}) *gomock.Call
Commit indicates an expected call of Commit
func (*MockBackendMockRecorder) Committee ¶ added in v0.4.0
func (mr *MockBackendMockRecorder) Committee(number interface{}) *gomock.Call
Committee indicates an expected call of Committee
func (*MockBackendMockRecorder) Finalize ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Finalize(chain, header, state, txs, uncles, receipts interface{}) *gomock.Call
Finalize indicates an expected call of Finalize
func (*MockBackendMockRecorder) FinalizeAndAssemble ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) FinalizeAndAssemble(chain, header, state, txs, uncles, receipts interface{}) *gomock.Call
FinalizeAndAssemble indicates an expected call of FinalizeAndAssemble
func (*MockBackendMockRecorder) GetContractABI ¶ added in v0.3.0
func (mr *MockBackendMockRecorder) GetContractABI() *gomock.Call
GetContractABI indicates an expected call of GetContractABI
func (*MockBackendMockRecorder) GetContractAddress ¶ added in v0.3.0
func (mr *MockBackendMockRecorder) GetContractAddress() *gomock.Call
GetContractAddress indicates an expected call of GetContractAddress
func (*MockBackendMockRecorder) GetProposer ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) GetProposer(number interface{}) *gomock.Call
GetProposer indicates an expected call of GetProposer
func (*MockBackendMockRecorder) Gossip ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Gossip(ctx, valSet, payload interface{}) *gomock.Call
Gossip indicates an expected call of Gossip
func (*MockBackendMockRecorder) HandleMsg ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) HandleMsg(address, data interface{}) *gomock.Call
HandleMsg indicates an expected call of HandleMsg
func (*MockBackendMockRecorder) HandleUnhandledMsgs ¶ added in v0.3.0
func (mr *MockBackendMockRecorder) HandleUnhandledMsgs(ctx interface{}) *gomock.Call
HandleUnhandledMsgs indicates an expected call of HandleUnhandledMsgs
func (*MockBackendMockRecorder) HasBadProposal ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) HasBadProposal(hash interface{}) *gomock.Call
HasBadProposal indicates an expected call of HasBadProposal
func (*MockBackendMockRecorder) LastCommittedProposal ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) LastCommittedProposal() *gomock.Call
LastCommittedProposal indicates an expected call of LastCommittedProposal
func (*MockBackendMockRecorder) NewChainHead ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) NewChainHead() *gomock.Call
NewChainHead indicates an expected call of NewChainHead
func (*MockBackendMockRecorder) Post ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Post(ev interface{}) *gomock.Call
Post indicates an expected call of Post
func (*MockBackendMockRecorder) Prepare ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Prepare(chain, header interface{}) *gomock.Call
Prepare indicates an expected call of Prepare
func (*MockBackendMockRecorder) Protocol ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Protocol() *gomock.Call
Protocol indicates an expected call of Protocol
func (*MockBackendMockRecorder) ResetPeerCache ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) ResetPeerCache(address interface{}) *gomock.Call
ResetPeerCache indicates an expected call of ResetPeerCache
func (*MockBackendMockRecorder) Seal ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Seal(chain, block, results, stop interface{}) *gomock.Call
Seal indicates an expected call of Seal
func (*MockBackendMockRecorder) SealHash ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) SealHash(header interface{}) *gomock.Call
SealHash indicates an expected call of SealHash
func (*MockBackendMockRecorder) SetBroadcaster ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) SetBroadcaster(arg0 interface{}) *gomock.Call
SetBroadcaster indicates an expected call of SetBroadcaster
func (*MockBackendMockRecorder) SetProposedBlockHash ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) SetProposedBlockHash(hash interface{}) *gomock.Call
SetProposedBlockHash indicates an expected call of SetProposedBlockHash
func (*MockBackendMockRecorder) Sign ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Sign(arg0 interface{}) *gomock.Call
Sign indicates an expected call of Sign
func (*MockBackendMockRecorder) Start ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Start(ctx, chain, currentBlock, hasBadBlock interface{}) *gomock.Call
Start indicates an expected call of Start
func (*MockBackendMockRecorder) Subscribe ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Subscribe(types ...interface{}) *gomock.Call
Subscribe indicates an expected call of Subscribe
func (*MockBackendMockRecorder) SyncPeer ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) SyncPeer(address, messages interface{}) *gomock.Call
SyncPeer indicates an expected call of SyncPeer
func (*MockBackendMockRecorder) VerifyHeader ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) VerifyHeader(chain, header, seal interface{}) *gomock.Call
VerifyHeader indicates an expected call of VerifyHeader
func (*MockBackendMockRecorder) VerifyHeaders ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) VerifyHeaders(chain, headers, seals interface{}) *gomock.Call
VerifyHeaders indicates an expected call of VerifyHeaders
func (*MockBackendMockRecorder) VerifyProposal ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) VerifyProposal(arg0 interface{}) *gomock.Call
VerifyProposal indicates an expected call of VerifyProposal
func (*MockBackendMockRecorder) VerifySeal ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) VerifySeal(chain, header interface{}) *gomock.Call
VerifySeal indicates an expected call of VerifySeal
func (*MockBackendMockRecorder) VerifyUncles ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) VerifyUncles(chain, block interface{}) *gomock.Call
VerifyUncles indicates an expected call of VerifyUncles
func (*MockBackendMockRecorder) WhiteList ¶ added in v0.3.0
func (mr *MockBackendMockRecorder) WhiteList() *gomock.Call
WhiteList indicates an expected call of WhiteList
type ModifyCommitteeEngine ¶ added in v0.4.0
func NewAddValidatorCore ¶ added in v0.4.0
func NewAddValidatorCore(c consensus.Engine, changedValidators Changes) *ModifyCommitteeEngine
func NewRemoveValidatorCore ¶ added in v0.4.0
func NewRemoveValidatorCore(c consensus.Engine, changedValidators Changes) *ModifyCommitteeEngine
func NewReplaceValidatorCore ¶ added in v0.4.0
func NewReplaceValidatorCore(c consensus.Engine, changedValidators Changes) *ModifyCommitteeEngine
func (ModifyCommitteeEngine) APIs ¶ added in v0.4.0
func (c ModifyCommitteeEngine) APIs(chain consensus.ChainReader) []rpc.API
func (ModifyCommitteeEngine) CalcDifficulty ¶ added in v0.4.0
func (ModifyCommitteeEngine) CommitteeSet ¶ added in v0.4.0
func (*ModifyCommitteeEngine) FinalizeAndAssemble ¶ added in v0.4.0
func (ModifyCommitteeEngine) GetCurrentHeightMessages ¶ added in v0.4.0
func (c ModifyCommitteeEngine) GetCurrentHeightMessages() []*Message
func (ModifyCommitteeEngine) NewChainHead ¶ added in v0.4.0
func (c ModifyCommitteeEngine) NewChainHead() error
func (ModifyCommitteeEngine) Prepare ¶ added in v0.4.0
func (c ModifyCommitteeEngine) Prepare(chain consensus.ChainReader, header *types.Header) error
func (ModifyCommitteeEngine) ResetPeerCache ¶ added in v0.4.0
func (ModifyCommitteeEngine) SetBroadcaster ¶ added in v0.4.0
func (c ModifyCommitteeEngine) SetBroadcaster(b consensus.Broadcaster)
func (ModifyCommitteeEngine) Start ¶ added in v0.4.0
func (c ModifyCommitteeEngine) Start(ctx context.Context, chain consensus.ChainReader, currentBlock func() *types.Block, hasBadBlock func(hash common.Hash) bool) error
Start implements core.Engine.Start
func (ModifyCommitteeEngine) Stop ¶ added in v0.4.0
func (c ModifyCommitteeEngine) Stop() error
Stop implements core.Engine.Stop
func (ModifyCommitteeEngine) SyncPeer ¶ added in v0.4.0
Synchronize new connected peer with current height state
func (*ModifyCommitteeEngine) VerifyHeader ¶ added in v0.4.0
func (*ModifyCommitteeEngine) VerifyHeader(_ consensus.ChainReader, _ *types.Header, _ bool) error
func (ModifyCommitteeEngine) VerifyHeaders ¶ added in v0.4.0
func (ModifyCommitteeEngine) VerifySeal ¶ added in v0.4.0
func (c ModifyCommitteeEngine) VerifySeal(chain consensus.ChainReader, header *types.Header) error
func (ModifyCommitteeEngine) VerifyUncles ¶ added in v0.4.0
func (c ModifyCommitteeEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
type Proposal ¶ added in v0.1.6
func NewProposal ¶ added in v0.1.6
func (*Proposal) DecodeRLP ¶ added in v0.1.6
DecodeRLP implements rlp.Decoder, and load the consensus fields from a RLP stream.
type TimeoutEvent ¶ added in v0.1.6
type TimeoutEvent struct {
// contains filtered or unexported fields
}
type VerifySelfProposalAlwaysTrueBackend ¶ added in v0.4.0
type VerifySelfProposalAlwaysTrueBackend struct { *testing.T Backend // contains filtered or unexported fields }
func NewChangeValidatorBackend ¶ added in v0.4.0
func (*VerifySelfProposalAlwaysTrueBackend) GetOriginal ¶ added in v0.4.0
func (b *VerifySelfProposalAlwaysTrueBackend) GetOriginal() Backend
func (*VerifySelfProposalAlwaysTrueBackend) VerifyHeader ¶ added in v0.4.0
func (b *VerifySelfProposalAlwaysTrueBackend) VerifyHeader(chain consensus.ChainReader, header *types.Header, seal bool) error