Skip to content

Commit

Permalink
consensus/ethash: set time to current instead of parent time
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed May 18, 2017
1 parent 10a57fc commit 8a4c1fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8a4c1fb

Please sign in to comment.