mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
added fork block number
This commit is contained in:
parent
6767c95887
commit
78c48ad903
2 changed files with 2 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ var (
|
|||
func CalcDifficulty(time, parentTime uint64, parentNumber, parentDiff *big.Int) *big.Int {
|
||||
diff := new(big.Int)
|
||||
|
||||
if parentNumber <= 23000 {
|
||||
if parentNumber <= params.HardFork1 {
|
||||
adjust := new(big.Int).Div(parentDiff, params.DifficultyBoundDivisor)
|
||||
} else {
|
||||
adjust := new(big.Int).Div(parentDiff, params.DifficultyBoundDivisor2)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ var (
|
|||
TxDataZeroGas = big.NewInt(4) // Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions.
|
||||
DifficultyBoundDivisor = big.NewInt(2048) // The bound divisor of the difficulty, used in the update calculations.
|
||||
DifficultyBoundDivisor2 = big.NewInt(512) // Difficulty should adjust faster.
|
||||
HardFork1 = big.NewInt(23000) // fork at this block number
|
||||
QuadCoeffDiv = big.NewInt(512) // Divisor for the quadratic particle of the memory cost equation.
|
||||
GenesisDifficulty = big.NewInt(131072) // Difficulty of the Genesis block.
|
||||
DurationLimit = big.NewInt(60) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not.
|
||||
|
|
|
|||
Loading…
Reference in a new issue