mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
consensus: add Istanbul consensus engine interface
This commit is contained in:
parent
fddd6635b5
commit
94ec62c544
1 changed files with 11 additions and 0 deletions
|
|
@ -120,3 +120,14 @@ type PoW interface {
|
||||||
// Hashrate returns the current mining hashrate of a PoW consensus engine.
|
// Hashrate returns the current mining hashrate of a PoW consensus engine.
|
||||||
Hashrate() float64
|
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
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue