diff --git a/core/chain_util.go b/core/chain_util.go index 6ce13af541..680355e5b7 100644 --- a/core/chain_util.go +++ b/core/chain_util.go @@ -40,11 +40,12 @@ var ( // given the parent block's time and difficulty. func CalcDifficulty(time, parentTime uint64, parentNumber, parentDiff *big.Int) *big.Int { diff := new(big.Int) + adjust := new(big.Int) if parentNumber.Cmp(params.HardFork1) < 0 { - adjust := new(big.Int).Div(parentDiff, params.DifficultyBoundDivisor) + adjust = new(big.Int).Div(parentDiff, params.DifficultyBoundDivisor) } else { - adjust := new(big.Int).Div(parentDiff, params.DifficultyBoundDivisor2) + adjust = new(big.Int).Div(parentDiff, params.DifficultyBoundDivisor2) } bigTime := new(big.Int)