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/
9034
9034
.and_then(|_| channel.interactive_tx_signing_session.as_mut())
9035
9035
.filter(|signing_session| signing_session.holder_tx_signatures().is_none())
9036
9036
{
9037
- let local_inputs_count = signing_session.local_inputs_count();
9038
- if local_inputs_count > 0 {
9037
+ if signing_session.has_local_contribution() {
9039
9038
let mut pending_events = self.pending_events.lock().unwrap();
9040
9039
let unsigned_transaction = signing_session.unsigned_tx().build_unsigned_tx();
9041
9040
let event_action = (
Original file line number Diff line number Diff line change @@ -561,6 +561,24 @@ impl InteractiveTxSigningSession {
561
561
. count ( )
562
562
}
563
563
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
+
564
582
pub fn shared_input ( & self ) -> Option < & NegotiatedTxInput > {
565
583
self . unsigned_tx
566
584
. shared_input_index
You can’t perform that action at this time.
0 commit comments