diff --git a/consensus/consensus.go b/consensus/consensus.go index 1e013d5d4c..87228ae49d 100644 --- a/consensus/consensus.go +++ b/consensus/consensus.go @@ -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 +}