mock

package
v0.6.2-alpha.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	// contains filtered or unexported fields
}

func NewMock

func NewMock() *Mock

func NewMockFail

func NewMockFail(failNum uint64) *Mock

func (*Mock) APIs

func (m *Mock) APIs(chain consensus.ChainReader) []rpc.API

APIs returns the RPC APIs this consensus engine provides.

func (*Mock) Author

func (m *Mock) Author(header *types.Header) (common.Address, error)

func (*Mock) CalcDifficulty

func (m *Mock) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int

func (*Mock) Finalize

func (m *Mock) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction,
	receipts []*types.Receipt) (*types.Block, error)

func (*Mock) HandleBftMsg

func (m *Mock) HandleBftMsg(chain consensus.ChainReader, msg types.ConsensusMsg)

func (*Mock) Prepare

func (m *Mock) Prepare(chain consensus.ChainReader, header *types.Header) error

func (*Mock) Seal

func (m *Mock) Seal(chain consensus.ChainReader, block *types.Block, stop <-chan struct{}) (*types.Block, error)

func (*Mock) VerifyCommitMsg

func (m *Mock) VerifyCommitMsg(block *types.Block) error

func (*Mock) VerifyHeader

func (m *Mock) VerifyHeader(chain consensus.ChainReader, header *types.Header, seal bool) error

func (*Mock) VerifyHeaders

func (m *Mock) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error)

func (*Mock) VerifySeal

func (m *Mock) VerifySeal(chain consensus.ChainReader, header *types.Header) error

func (*Mock) VerifyWitnesses

func (m *Mock) VerifyWitnesses(header *types.Header, db *state.StateDB, parent *types.Header) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL