aboutsummaryrefslogtreecommitdiffstats
path: root/consensus
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2017-04-24 16:32:01 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2017-05-18 15:05:58 +0800
commit8a4c1fb799449c1c12dd708e7cb30815c5116721 (patch)
tree7e366caf95f32c2d932239f272a64b02c726c964 /consensus
parent10a57fc3d45cbc59d6c8eeb0f7f2b93a71e8f4c9 (diff)
downloaddexon-8a4c1fb799449c1c12dd708e7cb30815c5116721.tar
dexon-8a4c1fb799449c1c12dd708e7cb30815c5116721.tar.gz
dexon-8a4c1fb799449c1c12dd708e7cb30815c5116721.tar.bz2
dexon-8a4c1fb799449c1c12dd708e7cb30815c5116721.tar.lz
dexon-8a4c1fb799449c1c12dd708e7cb30815c5116721.tar.xz
dexon-8a4c1fb799449c1c12dd708e7cb30815c5116721.tar.zst
dexon-8a4c1fb799449c1c12dd708e7cb30815c5116721.zip
consensus/ethash: set time to current instead of parent time
Diffstat (limited to 'consensus')
-rw-r--r--consensus/ethash/consensus.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go
index d02542224..fc5269abe 100644
--- a/consensus/ethash/consensus.go
+++ b/consensus/ethash/consensus.go
@@ -315,7 +315,7 @@ func calcDifficultyHomestead(time uint64, parent *types.Header) *big.Int {
// (parent_diff / 2048 * max(1 - (block_timestamp - parent_timestamp) // 10, -99))
// ) + 2^(periodCount - 2)
- bigTime := new(big.Int).Set(parent.Time)
+ bigTime := new(big.Int).Set(time)
bigParentTime := new(big.Int).Set(parent.Time)
// holds intermediate values to make the algo easier to read & audit