@@ -39,7 +39,7 @@ use crate::blinded_path::payment::{AsyncBolt12OfferContext, Bolt12OfferContext,
3939use crate::blinded_path::NodeIdLookUp;
4040use crate::chain;
4141use crate::chain::chaininterface::{
42- BroadcasterInterface, ConfirmationTarget, FeeEstimator, LowerBoundedFeeEstimator,
42+ BroadcastType, BroadcasterInterface, ConfirmationTarget, FeeEstimator, LowerBoundedFeeEstimator,
4343};
4444use crate::chain::channelmonitor::{
4545 Balance, ChannelMonitor, ChannelMonitorUpdate, ChannelMonitorUpdateStep, MonitorEvent,
@@ -6548,7 +6548,7 @@ where
65486548 "Broadcasting signed interactive funding transaction {}",
65496549 funding_tx.compute_txid()
65506550 );
6551- self.tx_broadcaster.broadcast_transactions(&[funding_tx]);
6551+ self.tx_broadcaster.broadcast_transactions(&[( funding_tx, BroadcastType::Funding) ]);
65526552 {
65536553 let mut pending_events = self.pending_events.lock().unwrap();
65546554 emit_channel_pending_event!(pending_events, channel);
@@ -8906,7 +8906,8 @@ where
89068906 ComplFunc: FnOnce(
89078907 Option<u64>,
89088908 bool,
8909- ) -> (Option<MonitorUpdateCompletionAction>, Option<RAAMonitorUpdateBlockingAction>),
8909+ )
8910+ -> (Option<MonitorUpdateCompletionAction>, Option<RAAMonitorUpdateBlockingAction>),
89108911 >(
89118912 &self, prev_hop: HTLCPreviousHopData, payment_preimage: PaymentPreimage,
89128913 payment_info: Option<PaymentClaimDetails>, attribution_data: Option<AttributionData>,
@@ -8944,7 +8945,8 @@ where
89448945 ComplFunc: FnOnce(
89458946 Option<u64>,
89468947 bool,
8947- ) -> (Option<MonitorUpdateCompletionAction>, Option<RAAMonitorUpdateBlockingAction>),
8948+ )
8949+ -> (Option<MonitorUpdateCompletionAction>, Option<RAAMonitorUpdateBlockingAction>),
89488950 >(
89498951 &self, prev_hop: HTLCClaimSource, payment_preimage: PaymentPreimage,
89508952 payment_info: Option<PaymentClaimDetails>, attribution_data: Option<AttributionData>,
@@ -9481,7 +9483,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
94819483 }
94829484 if let Some(tx) = batch_funding_tx {
94839485 log_info!(self.logger, "Broadcasting batch funding tx {}", tx.compute_txid());
9484- self.tx_broadcaster.broadcast_transactions(&[&tx]);
9486+ self.tx_broadcaster.broadcast_transactions(&[( &tx, BroadcastType::Funding) ]);
94859487 }
94869488 }
94879489 }
@@ -10147,7 +10149,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1014710149 };
1014810150 } else {
1014910151 log_info!(logger, "Broadcasting funding transaction with txid {}", tx.compute_txid());
10150- self.tx_broadcaster.broadcast_transactions(&[&tx]);
10152+ self.tx_broadcaster.broadcast_transactions(&[( &tx, BroadcastType::Funding) ]);
1015110153 }
1015210154 }
1015310155
@@ -11608,7 +11610,8 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1160811610 mem::drop(per_peer_state);
1160911611 if let Some((broadcast_tx, err)) = tx_err {
1161011612 log_info!(logger, "Broadcasting {}", log_tx!(broadcast_tx));
11611- self.tx_broadcaster.broadcast_transactions(&[&broadcast_tx]);
11613+ self.tx_broadcaster
11614+ .broadcast_transactions(&[(&broadcast_tx, BroadcastType::CooperativeClose)]);
1161211615 let _ = self.handle_error(err, *counterparty_node_id);
1161311616 }
1161411617 Ok(())
@@ -12935,7 +12938,10 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1293512938 }
1293612939 if let Some(broadcast_tx) = msgs.signed_closing_tx {
1293712940 log_info!(logger, "Broadcasting closing tx {}", log_tx!(broadcast_tx));
12938- self.tx_broadcaster.broadcast_transactions(&[&broadcast_tx]);
12941+ self.tx_broadcaster.broadcast_transactions(&[(
12942+ &broadcast_tx,
12943+ BroadcastType::CooperativeClose,
12944+ )]);
1293912945 }
1294012946 } else {
1294112947 // We don't know how to handle a channel_ready or signed_closing_tx for a
@@ -13062,7 +13068,10 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1306213068 handle_errors.push((*cp_id, Err(err)));
1306313069
1306413070 log_info!(logger, "Broadcasting {}", log_tx!(tx));
13065- self.tx_broadcaster.broadcast_transactions(&[&tx]);
13071+ self.tx_broadcaster.broadcast_transactions(&[(
13072+ &tx,
13073+ BroadcastType::CooperativeClose,
13074+ )]);
1306613075 false
1306713076 } else {
1306813077 true
0 commit comments