diff options
Diffstat (limited to 'consensus/consensus.go')
-rw-r--r-- | consensus/consensus.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/consensus/consensus.go b/consensus/consensus.go index 865238cee..be5e661c1 100644 --- a/consensus/consensus.go +++ b/consensus/consensus.go @@ -23,6 +23,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" + "math/big" ) // ChainReader defines a small collection of methods needed to access the local @@ -88,6 +89,10 @@ type Engine interface { // seal place on top. Seal(chain ChainReader, block *types.Block, stop <-chan struct{}) (*types.Block, error) + // CalcDifficulty is the difficulty adjustment algorithm. It returns the difficulty + // that a new block should have. + CalcDifficulty(chain ChainReader, time uint64, parent *types.Header) *big.Int + // APIs returns the RPC APIs this consensus engine provides. APIs(chain ChainReader) []rpc.API } |