Skip to content

Commit 39a53a8

Browse files
committed
Remove code duplication in FundedChannel::read
1 parent ca0a08f commit 39a53a8

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

0 commit comments

Comments
 (0)