mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
Correct difficulty calculation to use new difficulty minimum
This commit is contained in:
parent
5d31a475e9
commit
becc503230
@ -32,8 +32,10 @@ type StateQuery interface {
|
||||
func CalcDifficulty(block, parent *types.Header) *big.Int {
|
||||
diff := new(big.Int)
|
||||
|
||||
min := big.NewInt(2048)
|
||||
adjust := new(big.Int).Div(parent.Difficulty, min)
|
||||
diffBoundDiv := big.NewInt(2048)
|
||||
min := big.NewInt(131072)
|
||||
|
||||
adjust := new(big.Int).Div(parent.Difficulty, diffBoundDiv)
|
||||
if (block.Time - parent.Time) < 8 {
|
||||
diff.Add(parent.Difficulty, adjust)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user