This commit is contained in:
Christopher Franko 2015-09-24 15:34:44 -04:00
parent 3cb6e7745c
commit bfc916c6e3

View file

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