consensus/ethash: set time to current instead of parent time

This commit is contained in:
Jeffrey Wilcke 2017-04-24 10:32:01 +02:00
parent 10a57fc3d4
commit 8a4c1fb799

View File

@ -315,7 +315,7 @@ func calcDifficultyHomestead(time uint64, parent *types.Header) *big.Int {
// (parent_diff / 2048 * max(1 - (block_timestamp - parent_timestamp) // 10, -99)) // (parent_diff / 2048 * max(1 - (block_timestamp - parent_timestamp) // 10, -99))
// ) + 2^(periodCount - 2) // ) + 2^(periodCount - 2)
bigTime := new(big.Int).Set(parent.Time) bigTime := new(big.Int).Set(time)
bigParentTime := new(big.Int).Set(parent.Time) bigParentTime := new(big.Int).Set(parent.Time)
// holds intermediate values to make the algo easier to read & audit // holds intermediate values to make the algo easier to read & audit