Skip to content

Commit 8cbdca3

Browse files
authored
Merge pull request joemphilips#94 from canndrew/fix-accept-channel-validation
Fix bug in accept_channel msg validation
2 parents 7f271b2 + da19fcb commit 8cbdca3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/DotNetLightning.Core/Channel/ChannelError.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,8 @@ module internal AcceptChannelMsgValidation =
428428
Ok()
429429

430430
let checkDustLimitIsLargerThanOurChannelReserve (state: Data.WaitForAcceptChannelData) msg =
431-
let reserve = ChannelConstantHelpers.getOurChannelReserve state.LastSent.FundingSatoshis
432431
check
433-
msg.DustLimitSatoshis (>) reserve
432+
msg.DustLimitSatoshis (>) state.LastSent.ChannelReserveSatoshis
434433
"dust limit (%A) is bigger than our channel reserve (%A)"
435434

436435
let checkMinimumHTLCValueIsAcceptable (state: Data.WaitForAcceptChannelData) (msg: AcceptChannel) =

0 commit comments

Comments
 (0)