Documentation ¶
Index ¶
- type ConsensusCallbacks
- type DummyEngine
- func (self *DummyEngine) APIs(chain consensus.ChainReader) (res []rpc.API)
- func (self *DummyEngine) Author(header *types.Header) (common.Address, error)
- func (self *DummyEngine) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int
- func (self *DummyEngine) Close() error
- func (self *DummyEngine) ExtraStateChange(block *types.Block, statedb *state.StateDB) error
- func (self *DummyEngine) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...)
- func (self *DummyEngine) FinalizeAndAssemble(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error)
- func (self *DummyEngine) Prepare(chain consensus.ChainReader, header *types.Header) error
- func (self *DummyEngine) Seal(chain consensus.ChainReader, block *types.Block, results chan<- *types.Block, ...) (err error)
- func (self *DummyEngine) SealHash(header *types.Header) (hash common.Hash)
- func (self *DummyEngine) VerifyHeader(chain consensus.ChainReader, header *types.Header, seal bool) error
- func (self *DummyEngine) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error)
- func (self *DummyEngine) VerifySeal(chain consensus.ChainReader, header *types.Header) error
- func (self *DummyEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
- type OnAPIsCallbackType
- type OnExtraStateChangeType
- type OnFinalizeAndAssembleCallbackType
- type OnFinalizeCallbackType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsensusCallbacks ¶
type ConsensusCallbacks struct { OnSeal func(*types.Block) error OnSealHash func(*types.Header) OnAPIs OnAPIsCallbackType OnFinalize OnFinalizeCallbackType OnFinalizeAndAssemble OnFinalizeAndAssembleCallbackType OnExtraStateChange OnExtraStateChangeType }
type DummyEngine ¶
type DummyEngine struct {
// contains filtered or unexported fields
}
func NewDummyEngine ¶
func NewDummyEngine(cb *ConsensusCallbacks) *DummyEngine
func (*DummyEngine) APIs ¶
func (self *DummyEngine) APIs(chain consensus.ChainReader) (res []rpc.API)
func (*DummyEngine) CalcDifficulty ¶
func (self *DummyEngine) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int
func (*DummyEngine) Close ¶
func (self *DummyEngine) Close() error
func (*DummyEngine) ExtraStateChange ¶ added in v0.2.12
func (*DummyEngine) Finalize ¶
func (self *DummyEngine) Finalize( chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header)
func (*DummyEngine) FinalizeAndAssemble ¶
func (*DummyEngine) Prepare ¶
func (self *DummyEngine) Prepare(chain consensus.ChainReader, header *types.Header) error
func (*DummyEngine) Seal ¶
func (self *DummyEngine) Seal(chain consensus.ChainReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) (err error)
func (*DummyEngine) SealHash ¶
func (self *DummyEngine) SealHash(header *types.Header) (hash common.Hash)
func (*DummyEngine) VerifyHeader ¶
func (self *DummyEngine) VerifyHeader(chain consensus.ChainReader, header *types.Header, seal bool) error
func (*DummyEngine) VerifyHeaders ¶
func (self *DummyEngine) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error)
func (*DummyEngine) VerifySeal ¶
func (self *DummyEngine) VerifySeal(chain consensus.ChainReader, header *types.Header) error
func (*DummyEngine) VerifyUncles ¶
func (self *DummyEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
type OnAPIsCallbackType ¶
type OnAPIsCallbackType = func(consensus.ChainReader) []rpc.API
type OnExtraStateChangeType ¶ added in v0.2.12
type OnFinalizeCallbackType ¶
type OnFinalizeCallbackType = func(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header)
Click to show internal directories.
Click to hide internal directories.