From becc503230ecf259fefbd261ea0abf54bbbb0f5b Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Mon, 23 Mar 2015 16:31:50 +0100 Subject: Correct difficulty calculation to use new difficulty minimum --- core/chain_manager.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/chain_manager.go b/core/chain_manager.go index 1bc8edea6..73b68358b 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -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 { -- cgit v1.2.3