Documentation ¶
Overview ¶
Package core is a generated GoMock package.
Index ¶
- Variables
- func Encode(val interface{}) ([]byte, error)
- func New(backend Backend, config *config.Config) *core
- func NewRoundState(r *big.Int, h *big.Int) *roundState
- func PrepareCommittedSeal(hash common.Hash) []byte
- type Backend
- 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 validator.Set, ...) (*validator.Validator, error)
- func (m *Message) GetCode() uint64
- func (m *Message) GetSignature() []byte
- func (m *Message) Payload() ([]byte, error)
- func (m *Message) PayloadNoSig() ([]byte, error)
- func (m *Message) String() string
- type MockBackend
- func (m *MockBackend) APIs(chain consensus.ChainReader) []rpc.API
- func (m *MockBackend) Address() common.Address
- func (m *MockBackend) Author(header *types.Header) (common.Address, error)
- func (m *MockBackend) Broadcast(ctx context.Context, valSet validator.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, seals [][]byte) error
- func (m *MockBackend) EXPECT() *MockBackendMockRecorder
- func (m *MockBackend) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...)
- func (m *MockBackend) FinalizeAndAssemble(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error)
- func (m *MockBackend) GetProposer(number uint64) common.Address
- func (m *MockBackend) Gossip(ctx context.Context, valSet validator.Set, payload []byte)
- func (m *MockBackend) HandleMsg(address common.Address, data p2p.Msg) (bool, error)
- 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) Validators(number uint64) validator.Set
- 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
- type MockBackendMockRecorder
- func (mr *MockBackendMockRecorder) APIs(chain interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Address() *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, seals interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) Finalize(chain, header, state, txs, uncles interface{}) *gomock.Call
- func (mr *MockBackendMockRecorder) FinalizeAndAssemble(chain, header, state, txs, uncles, receipts interface{}) *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) 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) Validators(number 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
- type Proposal
- type Step
- type TimeoutEvent
- type VerifyHeaderAlwaysTrueEngine
- func (c VerifyHeaderAlwaysTrueEngine) APIs(chain consensus.ChainReader) []rpc.API
- func (c VerifyHeaderAlwaysTrueEngine) Author(header *types.Header) (common.Address, error)
- func (c VerifyHeaderAlwaysTrueEngine) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int
- func (c VerifyHeaderAlwaysTrueEngine) Close() error
- func (c VerifyHeaderAlwaysTrueEngine) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...)
- func (c VerifyHeaderAlwaysTrueEngine) FinalizeAndAssemble(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error)
- func (c VerifyHeaderAlwaysTrueEngine) GetCurrentHeightMessages() []*Message
- func (c VerifyHeaderAlwaysTrueEngine) HandleMsg(address common.Address, data p2p.Msg) (bool, error)
- func (c VerifyHeaderAlwaysTrueEngine) IsValidator(address common.Address) bool
- func (c VerifyHeaderAlwaysTrueEngine) NewChainHead() error
- func (c VerifyHeaderAlwaysTrueEngine) Prepare(chain consensus.ChainReader, header *types.Header) error
- func (c VerifyHeaderAlwaysTrueEngine) Protocol() (protocolName string, extraMsgCodes uint64)
- func (c VerifyHeaderAlwaysTrueEngine) Quorum(i int) bool
- func (c VerifyHeaderAlwaysTrueEngine) ResetPeerCache(address common.Address)
- func (c VerifyHeaderAlwaysTrueEngine) Seal(chain consensus.ChainReader, block *types.Block, results chan<- *types.Block, ...) error
- func (c VerifyHeaderAlwaysTrueEngine) SealHash(header *types.Header) common.Hash
- func (c VerifyHeaderAlwaysTrueEngine) SetBroadcaster(b consensus.Broadcaster)
- func (c VerifyHeaderAlwaysTrueEngine) Start(ctx context.Context, chain consensus.ChainReader, ...) error
- func (c VerifyHeaderAlwaysTrueEngine) Stop() error
- func (c VerifyHeaderAlwaysTrueEngine) SyncPeer(address common.Address)
- func (c *VerifyHeaderAlwaysTrueEngine) VerifyHeader(_ consensus.ChainReader, _ *types.Header, _ bool) error
- func (c VerifyHeaderAlwaysTrueEngine) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error)
- func (c VerifyHeaderAlwaysTrueEngine) VerifySeal(chain consensus.ChainReader, header *types.Header) error
- func (c VerifyHeaderAlwaysTrueEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
- type Vote
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewRoundState ¶
NewRoundState creates a new roundState 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
func PrepareCommittedSeal ¶
PrepareCommittedSeal returns a committed seal for the given hash
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 validator set Validators(number uint64) validator.Set Subscribe(types ...interface{}) *event.TypeMuxSubscription Post(ev interface{}) // Broadcast sends a message to all validators (include self) Broadcast(ctx context.Context, valSet validator.Set, payload []byte) error // Gossip sends a message to all validators (exclude self) Gossip(ctx context.Context, valSet validator.Set, payload []byte) // Commit delivers an approved proposal to backend. // The delivered proposal will be put into blockchain. Commit(proposalBlock types.Block, 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) SyncPeer(address common.Address, messages []*Message) ResetPeerCache(address common.Address) }
Backend provides application specific functions for Istanbul core
type Message ¶ added in v0.1.6
type Message struct { Code uint64 Msg []byte Address common.Address Signature []byte CommittedSeal []byte }
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) 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) Commit ¶ added in v0.1.6
func (m *MockBackend) Commit(proposalBlock types.Block, seals [][]byte) error
Commit 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)
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) GetProposer ¶ added in v0.1.6
func (m *MockBackend) GetProposer(number uint64) common.Address
GetProposer 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) Validators ¶ added in v0.1.6
func (m *MockBackend) Validators(number uint64) validator.Set
Validators 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
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) Address ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Address() *gomock.Call
Address indicates an expected call of Address
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, seals interface{}) *gomock.Call
Commit indicates an expected call of Commit
func (*MockBackendMockRecorder) Finalize ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Finalize(chain, header, state, txs, uncles 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) 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) 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) Validators ¶ added in v0.1.6
func (mr *MockBackendMockRecorder) Validators(number interface{}) *gomock.Call
Validators indicates an expected call of Validators
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
type Proposal ¶ added in v0.1.6
type Proposal struct { Round *big.Int Height *big.Int ValidRound *big.Int // RLP decode sets nil to 0, so 0 = false and 1 = true IsValidRoundNil *big.Int ProposalBlock *types.Block }
func NewProposal ¶ added in v0.1.6
type TimeoutEvent ¶ added in v0.1.6
type TimeoutEvent struct {
// contains filtered or unexported fields
}
type VerifyHeaderAlwaysTrueEngine ¶ added in v0.1.6
type VerifyHeaderAlwaysTrueEngine struct {
// contains filtered or unexported fields
}
func NewVerifyHeaderAlwaysTrueEngine ¶ added in v0.1.6
func NewVerifyHeaderAlwaysTrueEngine(c consensus.Engine) *VerifyHeaderAlwaysTrueEngine
func (VerifyHeaderAlwaysTrueEngine) APIs ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) APIs(chain consensus.ChainReader) []rpc.API
func (VerifyHeaderAlwaysTrueEngine) CalcDifficulty ¶ added in v0.1.6
func (VerifyHeaderAlwaysTrueEngine) Close ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) Close() error
func (VerifyHeaderAlwaysTrueEngine) Finalize ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header)
func (VerifyHeaderAlwaysTrueEngine) FinalizeAndAssemble ¶ added in v0.1.6
func (VerifyHeaderAlwaysTrueEngine) GetCurrentHeightMessages ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) GetCurrentHeightMessages() []*Message
func (VerifyHeaderAlwaysTrueEngine) IsValidator ¶ added in v0.1.6
func (VerifyHeaderAlwaysTrueEngine) NewChainHead ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) NewChainHead() error
func (VerifyHeaderAlwaysTrueEngine) Prepare ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) Prepare(chain consensus.ChainReader, header *types.Header) error
func (VerifyHeaderAlwaysTrueEngine) ResetPeerCache ¶ added in v0.1.6
func (VerifyHeaderAlwaysTrueEngine) SetBroadcaster ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) SetBroadcaster(b consensus.Broadcaster)
func (VerifyHeaderAlwaysTrueEngine) Start ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) Start(ctx context.Context, chain consensus.ChainReader, currentBlock func() *types.Block, hasBadBlock func(hash common.Hash) bool) error
Start implements core.Engine.Start
func (VerifyHeaderAlwaysTrueEngine) Stop ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) Stop() error
Stop implements core.Engine.Stop
func (VerifyHeaderAlwaysTrueEngine) SyncPeer ¶ added in v0.1.6
Synchronize new connected peer with current height state
func (*VerifyHeaderAlwaysTrueEngine) VerifyHeader ¶ added in v0.1.6
func (c *VerifyHeaderAlwaysTrueEngine) VerifyHeader(_ consensus.ChainReader, _ *types.Header, _ bool) error
func (VerifyHeaderAlwaysTrueEngine) VerifyHeaders ¶ added in v0.1.6
func (VerifyHeaderAlwaysTrueEngine) VerifySeal ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) VerifySeal(chain consensus.ChainReader, header *types.Header) error
func (VerifyHeaderAlwaysTrueEngine) VerifyUncles ¶ added in v0.1.6
func (c VerifyHeaderAlwaysTrueEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error