Skip to content

Commit e28c2dc

Browse files
committed
f clear funding_outpoint at callsite of get_initial_commitment_signed upon error
1 parent c481d42 commit e28c2dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,10 @@ pub(super) trait InteractivelyFunded<SP: Deref> where SP::Target: SignerProvider
17611761
context.funding_transaction = Some(signing_session.unsigned_tx.clone().into_unsigned_tx());
17621762
commitment_signed
17631763
},
1764-
Err(err) => return Err(ChannelError::Close((err.to_string(), ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(false) }))),
1764+
Err(err) => {
1765+
context.channel_transaction_parameters.funding_outpoint = None;
1766+
return Err(ChannelError::Close((err.to_string(), ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(false) })))
1767+
},
17651768
};
17661769

17671770
let funding_ready_for_sig_event = None;
@@ -4008,7 +4011,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
40084011
Ok(res) => res,
40094012
Err(e) => {
40104013
log_error!(logger, "Got bad signatures: {:?}!", e);
4011-
self.channel_transaction_parameters.funding_outpoint = None;
40124014
return Err(e);
40134015
}
40144016
};

0 commit comments

Comments
 (0)