mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
ubqhash/consensus: import log; pass chain, not chain.Config to CalcDifficulty from Prepare()
This commit is contained in:
parent
b24cb69231
commit
b75f3a1b07
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue