File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
src/DotNetLightning.Core/Channel Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -151,11 +151,7 @@ and InvalidMonoHopUnidirectionalPaymentError = {
151
151
Msg: MonoHopUnidirectionalPayment
152
152
Errors: string list
153
153
}
154
- with
155
- static member Create msg e = {
156
- Msg = msg
157
- Errors = e
158
- }
154
+
159
155
and InvalidUpdateAddHTLCError = {
160
156
Msg: UpdateAddHTLC
161
157
Errors: string list
Original file line number Diff line number Diff line change @@ -175,11 +175,11 @@ module internal Validation =
175
175
176
176
let checkOurMonoHopUnidirectionalPaymentIsAcceptableWithCurrentSpec ( currentSpec ) ( state : Commitments ) ( payment : MonoHopUnidirectionalPayment ) =
177
177
Validation.ofResult( MonoHopUnidirectionalPaymentValidationWithContext.checkWeHaveSufficientFunds state currentSpec)
178
- |> Result.mapError( InvalidMonoHopUnidirectionalPaymentError.Create payment >> InvalidMonoHopUnidirectionalPayment)
178
+ |> Result.mapError( fun errs -> InvalidMonoHopUnidirectionalPayment { Msg = payment ; Errors = errs } )
179
179
180
180
let checkTheirMonoHopUnidirectionalPaymentIsAcceptableWithCurrentSpec ( currentSpec ) ( state : Commitments ) ( payment : MonoHopUnidirectionalPayment ) =
181
181
Validation.ofResult( MonoHopUnidirectionalPaymentValidationWithContext.checkWeHaveSufficientFunds state currentSpec)
182
- |> Result.mapError( InvalidMonoHopUnidirectionalPaymentError.Create payment >> InvalidMonoHopUnidirectionalPayment)
182
+ |> Result.mapError( fun errs -> InvalidMonoHopUnidirectionalPayment { Msg = payment ; Errors = errs } )
183
183
184
184
let checkOperationAddHTLC ( state : NormalData ) ( op : OperationAddHTLC ) =
185
185
Validation.ofResult( UpdateAddHTLCValidation.checkExpiryIsNotPast op.CurrentHeight op.Expiry)
You can’t perform that action at this time.
0 commit comments