Skip to content

Commit bb245ff

Browse files
committed
Remove code duplication in FundedChannel::read
1 parent 5dd38b3 commit bb245ff

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13277,13 +13277,8 @@ where
1327713277
match &mut htlc.state {
1327813278
OutboundHTLCState::AwaitingRemoteRevokeToRemove(OutboundHTLCOutcome::Success(
1327913279
ref mut preimage,
13280-
)) => {
13281-
// This variant was initialized like this further above
13282-
debug_assert_eq!(preimage, &PaymentPreimage([0u8; 32]));
13283-
// Flatten and unwrap the preimage; they are always set starting in 0.2.
13284-
*preimage = iter.next().flatten().ok_or(DecodeError::InvalidValue)?;
13285-
},
13286-
OutboundHTLCState::AwaitingRemovedRemoteRevoke(OutboundHTLCOutcome::Success(
13280+
))
13281+
| OutboundHTLCState::AwaitingRemovedRemoteRevoke(OutboundHTLCOutcome::Success(
1328713282
ref mut preimage,
1328813283
)) => {
1328913284
// This variant was initialized like this further above

0 commit comments

Comments
 (0)