Skip to content

Commit

Permalink
Base target calculation error was fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykiselev committed Jan 5, 2018
1 parent 7890b19 commit 0ee8e23
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ package object appender extends ScorexLogging {
_ <- Either.cond(calcGs.sameElements(blockGs), (), GenericError(s"declared generation signature ${blockGs.mkString} does not match calculated generation signature ${calcGs.mkString}"))
effectiveBalance <- genBalance(height).left.map(GenericError(_))
hit = calcHit(prevBlockData, generator)
target = calcTarget(parent.consensusData.baseTarget, parent.timestamp, blockTime, effectiveBalance)
target = calcTarget(parent.timestamp, parent.consensusData.baseTarget, blockTime, effectiveBalance)
_ <- Either.cond(hit < target, (), GenericError(s"calculated hit $hit >= calculated target $target"))
} yield ()

Expand Down

0 comments on commit 0ee8e23

Please sign in to comment.