aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-08-09 20:15:13 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-08-09 20:15:13 +0800
commit07cb8092e7a41e80224dc63691146e8714f94ebf (patch)
tree80202782040d61207819d6b895fa5a94149987a9 /core
parent1cbd53add8f88032e82b9df7ac6813d4120cc75c (diff)
parent74f6d90153a4d62eefaa8a49f98dc6ed8e0100f6 (diff)
downloaddexon-07cb8092e7a41e80224dc63691146e8714f94ebf.tar
dexon-07cb8092e7a41e80224dc63691146e8714f94ebf.tar.gz
dexon-07cb8092e7a41e80224dc63691146e8714f94ebf.tar.bz2
dexon-07cb8092e7a41e80224dc63691146e8714f94ebf.tar.lz
dexon-07cb8092e7a41e80224dc63691146e8714f94ebf.tar.xz
dexon-07cb8092e7a41e80224dc63691146e8714f94ebf.tar.zst
dexon-07cb8092e7a41e80224dc63691146e8714f94ebf.zip
Merge pull request #1611 from obscuren/expdiff-olympic-fix
cmd/utils, core: disable exp diff for olympic net
Diffstat (limited to 'core')
-rw-r--r--core/chain_util.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/chain_util.go b/core/chain_util.go
index 34f6c8d0a..84b462ce3 100644
--- a/core/chain_util.go
+++ b/core/chain_util.go
@@ -32,7 +32,7 @@ import (
var (
blockHashPre = []byte("block-hash-")
blockNumPre = []byte("block-num-")
- expDiffPeriod = big.NewInt(100000)
+ ExpDiffPeriod = big.NewInt(100000)
)
// CalcDifficulty is the difficulty adjustment algorithm. It returns
@@ -57,7 +57,7 @@ func CalcDifficulty(time, parentTime uint64, parentNumber, parentDiff *big.Int)
}
periodCount := new(big.Int).Add(parentNumber, common.Big1)
- periodCount.Div(periodCount, expDiffPeriod)
+ periodCount.Div(periodCount, ExpDiffPeriod)
if periodCount.Cmp(common.Big1) > 0 {
// diff = diff + 2^(periodCount - 2)
expDiff := periodCount.Sub(periodCount, common.Big2)