Skip to content

Commit 740b43e

Browse files
committed
Remove code duplication in FundedChannel::read
1 parent f8c81b3 commit 740b43e

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
@@ -13216,13 +13216,8 @@ where
1321613216
match &mut htlc.state {
1321713217
OutboundHTLCState::AwaitingRemoteRevokeToRemove(OutboundHTLCOutcome::Success(
1321813218
ref mut preimage,
13219-
)) => {
13220-
// This variant was initialized like this further above
13221-
debug_assert_eq!(preimage, &PaymentPreimage([0u8; 32]));
13222-
// Flatten and unwrap the preimage; they are always set starting in 0.2.
13223-
*preimage = iter.next().flatten().ok_or(DecodeError::InvalidValue)?;
13224-
},
13225-
OutboundHTLCState::AwaitingRemovedRemoteRevoke(OutboundHTLCOutcome::Success(
13219+
))
13220+
| OutboundHTLCState::AwaitingRemovedRemoteRevoke(OutboundHTLCOutcome::Success(
1322613221
ref mut preimage,
1322713222
)) => {
1322813223
// This variant was initialized like this further above

0 commit comments

Comments
 (0)