Skip to content

Commit

Permalink
Merge pull request #773 from wavesplatform/fix-bt
Browse files Browse the repository at this point in the history
Base target calculation error was fixed
  • Loading branch information
alexeykiselev authored Jan 5, 2018
2 parents 7890b19 + 0ee8e23 commit 8293aa6
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 8293aa6

Please sign in to comment.