From 8a4c1fb799449c1c12dd708e7cb30815c5116721 Mon Sep 17 00:00:00 2001
From: Jeffrey Wilcke <jeffrey@ethereum.org>
Date: Mon, 24 Apr 2017 10:32:01 +0200
Subject: consensus/ethash: set time to current instead of parent time

---
 consensus/ethash/consensus.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'consensus/ethash/consensus.go')

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
-- 
cgit v1.2.3