consensus: add Istanbul consensus engine interface

This commit is contained in:
mark.lin 2017-09-12 10:55:02 +08:00
parent fddd6635b5
commit 94ec62c544

View file

@ -120,3 +120,14 @@ type PoW interface {
// Hashrate returns the current mining hashrate of a PoW consensus engine.
Hashrate() float64
}
// Istanbul is a consensus engine to avoid byzantine failure
type Istanbul interface {
Engine
// Start starts the engine
Start(chain ChainReader, currentBlock func() *types.Block, hasBadBlock func(hash common.Hash) bool) error
// Stop stops the engine
Stop() error
}