Skip to content

Commit 3ff7695

Browse files
canndrewknocte
authored andcommitted
Fix fee rate calculation
FeeRatePerKw.FromFee was mis-calculating the fee rate from the fee and weight. This was commited upstream in 37c24b1: joemphilips@37c24b1
1 parent a1e6d9b commit 3ff7695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DotNetLightning.Core/Utils/Primitives.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ module Primitives =
317317
type FeeRatePerKw = | FeeRatePerKw of uint32 with
318318
member x.Value = let (FeeRatePerKw v) = x in v
319319
static member FromFee(fee: Money, weight: uint64) =
320-
(((uint64 fee.Satoshi) * weight) / 1000UL)
320+
(((uint64 fee.Satoshi) * 1000UL) / weight)
321321
|> uint32
322322
|> FeeRatePerKw
323323

0 commit comments

Comments
 (0)