File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -9034,8 +9034,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
90349034 .and_then(|_| channel.interactive_tx_signing_session.as_mut())
90359035 .filter(|signing_session| signing_session.holder_tx_signatures().is_none())
90369036 {
9037- let local_inputs_count = signing_session.local_inputs_count();
9038- if local_inputs_count > 0 {
9037+ if signing_session.has_local_contribution() {
90399038 let mut pending_events = self.pending_events.lock().unwrap();
90409039 let unsigned_transaction = signing_session.unsigned_tx().build_unsigned_tx();
90419040 let event_action = (
Original file line number Diff line number Diff line change @@ -561,6 +561,24 @@ impl InteractiveTxSigningSession {
561561 . count ( )
562562 }
563563
564+ fn local_outputs_count ( & self ) -> usize {
565+ self . unsigned_tx
566+ . outputs
567+ . iter ( )
568+ . enumerate ( )
569+ . filter ( |( _, output) | {
570+ !is_serial_id_valid_for_counterparty (
571+ self . unsigned_tx . holder_is_initiator ,
572+ output. serial_id ,
573+ )
574+ } )
575+ . count ( )
576+ }
577+
578+ pub fn has_local_contribution ( & self ) -> bool {
579+ self . local_inputs_count ( ) > 0 || self . local_outputs_count ( ) > 0
580+ }
581+
564582 pub fn shared_input ( & self ) -> Option < & NegotiatedTxInput > {
565583 self . unsigned_tx
566584 . shared_input_index
You can’t perform that action at this time.
0 commit comments