@@ -604,6 +604,12 @@ pub struct ChannelDetails {
604
604
/// Note that this means this value is *not* persistent - it can change once during the
605
605
/// lifetime of the channel.
606
606
pub channel_id : [ u8 ; 32 ] ,
607
+ /// The Channel's funding transaction output, if we've negotiated the funding transaction with
608
+ /// our counterparty already.
609
+ ///
610
+ /// Note that, if this has been set, `channel_id` will be equivalent to
611
+ /// `funding_txo.unwrap().to_channel_id()`.
612
+ pub funding_txo : Option < OutPoint > ,
607
613
/// The position of the funding transaction in the chain. None if the funding transaction has
608
614
/// not yet been confirmed and the channel fully opened.
609
615
pub short_channel_id : Option < u64 > ,
@@ -631,7 +637,8 @@ pub struct ChannelDetails {
631
637
/// True if the channel is (a) confirmed and funding_locked messages have been exchanged, (b)
632
638
/// the peer is connected, and (c) no monitor update failure is pending resolution.
633
639
pub is_live : bool ,
634
-
640
+ /// True if this channel is (or will be) publicly-announced.
641
+ pub is_public : bool ,
635
642
/// Information on the fees and requirements that the counterparty requires when forwarding
636
643
/// payments to us through this channel.
637
644
pub counterparty_forwarding_info : Option < CounterpartyForwardingInfo > ,
@@ -954,6 +961,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
954
961
let ( inbound_capacity_msat, outbound_capacity_msat) = channel. get_inbound_outbound_available_balance_msat ( ) ;
955
962
res. push ( ChannelDetails {
956
963
channel_id : ( * channel_id) . clone ( ) ,
964
+ funding_txo : channel. get_funding_txo ( ) ,
957
965
short_channel_id : channel. get_short_channel_id ( ) ,
958
966
remote_network_id : channel. get_counterparty_node_id ( ) ,
959
967
counterparty_features : InitFeatures :: empty ( ) ,
@@ -962,6 +970,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
962
970
outbound_capacity_msat,
963
971
user_id : channel. get_user_id ( ) ,
964
972
is_live : channel. is_live ( ) ,
973
+ is_public : channel. should_announce ( ) ,
965
974
counterparty_forwarding_info : channel. counterparty_forwarding_info ( ) ,
966
975
} ) ;
967
976
}
0 commit comments