@@ -1631,23 +1631,12 @@ impl<SP: Deref> Channel<SP> where
1631
1631
where
1632
1632
L::Target: Logger
1633
1633
{
1634
- match self.phase {
1635
- ChannelPhase::UnfundedV2(ref mut chan) => {
1636
- let logger = WithChannelContext::from(logger, &chan.context, None);
1637
- let (commitment_signed, event) = chan.as_negotiating_channel().funding_tx_constructed(signing_session, &&logger)?;
1638
- Ok((commitment_signed, event))
1639
- }
1640
- #[cfg(splicing)]
1641
- ChannelPhase::Funded(ref mut chan) => {
1642
- let logger = WithChannelContext::from(logger, &chan.context, None);
1643
- let (commitment_signed, event) = chan.as_renegotiating_channel()
1644
- .map_err(|err| ChannelError::Warn(err.into()))?
1645
- .funding_tx_constructed(signing_session, &&logger)?;
1646
- Ok((commitment_signed, event))
1647
- }
1648
- _ => {
1649
- Err(ChannelError::Warn("Got a tx_complete message with no interactive transaction construction expected or in-progress".to_owned()))
1650
- }
1634
+ let logger = WithChannelContext::from(logger, self.context(), None);
1635
+ if let Ok(mut negotiating_channel) = self.as_negotiating_channel() {
1636
+ let (commitment_signed, event) = negotiating_channel.funding_tx_constructed(signing_session, &&logger)?;
1637
+ Ok((commitment_signed, event))
1638
+ } else {
1639
+ Err(ChannelError::Warn("Got a tx_complete message with no interactive transaction construction expected or in-progress".to_owned()))
1651
1640
}
1652
1641
}
1653
1642
0 commit comments