aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_manager.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-03-23 23:39:26 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-03-23 23:39:26 +0800
commit9562a9840f783e6252ebc6fb8da62b81004f62e8 (patch)
treefc7c1114d99e43999dadb19cf81cef199d6df14a /core/chain_manager.go
parent5707912e2f7d49b3654d616ddae3439e6dc201c4 (diff)
parentbecc503230ecf259fefbd261ea0abf54bbbb0f5b (diff)
downloadgo-tangerine-9562a9840f783e6252ebc6fb8da62b81004f62e8.tar
go-tangerine-9562a9840f783e6252ebc6fb8da62b81004f62e8.tar.gz
go-tangerine-9562a9840f783e6252ebc6fb8da62b81004f62e8.tar.bz2
go-tangerine-9562a9840f783e6252ebc6fb8da62b81004f62e8.tar.lz
go-tangerine-9562a9840f783e6252ebc6fb8da62b81004f62e8.tar.xz
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/chain_manager.go')
-rw-r--r--core/chain_manager.go6
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 {