mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-19 21:45:36 +01:00
Modified rounding on DLCPayoutCurve interpolation to match spec (#2470)
This commit is contained in:
parent
ecc4532bf7
commit
141fc548bc
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ sealed trait DLCPayoutCurveComponent {
|
||||||
protected def bigDecimalSats(bd: BigDecimal): Satoshis = {
|
protected def bigDecimalSats(bd: BigDecimal): Satoshis = {
|
||||||
Satoshis(
|
Satoshis(
|
||||||
bd.setScale(6, RoundingMode.HALF_UP)
|
bd.setScale(6, RoundingMode.HALF_UP)
|
||||||
.setScale(0, RoundingMode.FLOOR)
|
.setScale(0, RoundingMode.HALF_UP)
|
||||||
.toLongExact)
|
.toLongExact)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue