Modified rounding on DLCPayoutCurve interpolation to match spec (#2470)

This commit is contained in:
Nadav Kohen 2021-01-07 06:42:01 -06:00 committed by GitHub
parent 46c73970ff
commit 680ed4b58a

View File

@ -171,7 +171,7 @@ sealed trait DLCPayoutCurveComponent {
protected def bigDecimalSats(bd: BigDecimal): Satoshis = {
Satoshis(
bd.setScale(6, RoundingMode.HALF_UP)
.setScale(0, RoundingMode.FLOOR)
.setScale(0, RoundingMode.HALF_UP)
.toLongExact)
}
}