mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
qf2
This commit is contained in:
parent
3cb6e7745c
commit
bfc916c6e3
1 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue