Skip to content

Commit a42bf11

Browse files
committed
Remove code duplication in FundedChannel::read
1 parent 3ffc2af commit a42bf11

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
@@ -13226,13 +13226,8 @@ where
1322613226
match &mut htlc.state {
1322713227
OutboundHTLCState::AwaitingRemoteRevokeToRemove(OutboundHTLCOutcome::Success(
1322813228
ref mut preimage,
13229-
)) => {
13230-
// This variant was initialized like this further above
13231-
debug_assert_eq!(preimage, &PaymentPreimage([0u8; 32]));
13232-
// Flatten and unwrap the preimage; they are always set starting in 0.2.
13233-
*preimage = iter.next().flatten().ok_or(DecodeError::InvalidValue)?;
13234-
},
13235-
OutboundHTLCState::AwaitingRemovedRemoteRevoke(OutboundHTLCOutcome::Success(
13229+
))
13230+
| OutboundHTLCState::AwaitingRemovedRemoteRevoke(OutboundHTLCOutcome::Success(
1323613231
ref mut preimage,
1323713232
)) => {
1323813233
// This variant was initialized like this further above

0 commit comments

Comments
 (0)