From b75f3a1b076c794e24d9a01544745f9dfafb27ec Mon Sep 17 00:00:00 2001 From: Luke Williams Date: Sat, 23 Feb 2019 01:13:05 +0100 Subject: [PATCH] ubqhash/consensus: import log; pass chain, not chain.Config to CalcDifficulty from Prepare() --- consensus/ubqhash/consensus.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/consensus/ubqhash/consensus.go b/consensus/ubqhash/consensus.go index d9ddabb80d..f71ee61097 100644 --- a/consensus/ubqhash/consensus.go +++ b/consensus/ubqhash/consensus.go @@ -30,6 +30,7 @@ import ( "github.com/ubiq/go-ubiq/consensus/misc" "github.com/ubiq/go-ubiq/core/state" "github.com/ubiq/go-ubiq/core/types" + "github.com/ubiq/go-ubiq/log" "github.com/ubiq/go-ubiq/params" set "gopkg.in/fatih/set.v0" ) @@ -626,7 +627,7 @@ func (ubqhash *Ubqhash) Prepare(chain consensus.ChainReader, header *types.Heade if parent == nil { return consensus.ErrUnknownAncestor } - header.Difficulty = CalcDifficulty(chain.Config(), header.Time.Uint64(), parent) + header.Difficulty = CalcDifficulty(chain, header.Time.Uint64(), parent) return nil }