Skip to content

Commit 839bb10

Browse files
committed
Remove code duplication in FundedChannel::read
1 parent cbdc1df commit 839bb10

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
@@ -13241,13 +13241,8 @@ where
1324113241
match &mut htlc.state {
1324213242
OutboundHTLCState::AwaitingRemoteRevokeToRemove(OutboundHTLCOutcome::Success(
1324313243
ref mut preimage,
13244-
)) => {
13245-
// This variant was initialized like this further above
13246-
debug_assert_eq!(preimage, &PaymentPreimage([0u8; 32]));
13247-
// Flatten and unwrap the preimage; they are always set starting in 0.2.
13248-
*preimage = iter.next().flatten().ok_or(DecodeError::InvalidValue)?;
13249-
},
13250-
OutboundHTLCState::AwaitingRemovedRemoteRevoke(OutboundHTLCOutcome::Success(
13244+
))
13245+
| OutboundHTLCState::AwaitingRemovedRemoteRevoke(OutboundHTLCOutcome::Success(
1325113246
ref mut preimage,
1325213247
)) => {
1325313248
// This variant was initialized like this further above

0 commit comments

Comments
 (0)