diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-23 23:39:26 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-23 23:39:26 +0800 |
commit | 9562a9840f783e6252ebc6fb8da62b81004f62e8 (patch) | |
tree | fc7c1114d99e43999dadb19cf81cef199d6df14a /core | |
parent | 5707912e2f7d49b3654d616ddae3439e6dc201c4 (diff) | |
parent | becc503230ecf259fefbd261ea0abf54bbbb0f5b (diff) | |
download | go-tangerine-9562a9840f783e6252ebc6fb8da62b81004f62e8.tar.gz go-tangerine-9562a9840f783e6252ebc6fb8da62b81004f62e8.tar.zst go-tangerine-9562a9840f783e6252ebc6fb8da62b81004f62e8.zip |
Merge pull request #537 from Gustav-Simonsson/blocktests2
Add post state validation to block tests and disable network, add RPC
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_manager.go | 6 |
1 files 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 { |