@@ -922,6 +922,12 @@ pub struct ChannelCounterparty {
922
922
/// Information on the fees and requirements that the counterparty requires when forwarding
923
923
/// payments to us through this channel.
924
924
pub forwarding_info : Option < CounterpartyForwardingInfo > ,
925
+ /// The smallest value HTLC (in msat) the remote peer will accept, for this channel. This field
926
+ /// is only `None` before we have received either the `OpenChannel` or `AcceptChannel` message
927
+ /// from the remote peer, or for `ChannelCounterparty` objects serialized prior to LDK 0.0.107.
928
+ pub outbound_htlc_minimum_msat : Option < u64 > ,
929
+ /// The largest value HTLC (in msat) the remote peer currently will accept, for this channel.
930
+ pub outbound_htlc_maximum_msat : Option < u64 > ,
925
931
}
926
932
927
933
/// Details of a channel, as returned by ChannelManager::list_channels and ChannelManager::list_usable_channels
@@ -1675,6 +1681,14 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
1675
1681
features : InitFeatures :: empty ( ) ,
1676
1682
unspendable_punishment_reserve : to_remote_reserve_satoshis,
1677
1683
forwarding_info : channel. counterparty_forwarding_info ( ) ,
1684
+ // Ensures that we have actually received the `htlc_minimum_msat` value
1685
+ // from the counterparty through the `OpenChannel` or `AcceptChannel`
1686
+ // message (as they are always the first message from the counterparty).
1687
+ // Else `Channel::get_counterparty_htlc_minimum_msat` could return the
1688
+ // default `0` value set by `Channel::new_outbound`.
1689
+ outbound_htlc_minimum_msat : if channel. have_received_message ( ) {
1690
+ Some ( channel. get_counterparty_htlc_minimum_msat ( ) ) } else { None } ,
1691
+ outbound_htlc_maximum_msat : channel. get_counterparty_htlc_maximum_msat ( ) ,
1678
1692
} ,
1679
1693
funding_txo : channel. get_funding_txo ( ) ,
1680
1694
// Note that accept_channel (or open_channel) is always the first message, so
@@ -5904,6 +5918,8 @@ impl_writeable_tlv_based!(ChannelCounterparty, {
5904
5918
( 4 , features, required) ,
5905
5919
( 6 , unspendable_punishment_reserve, required) ,
5906
5920
( 8 , forwarding_info, option) ,
5921
+ ( 9 , outbound_htlc_minimum_msat, option) ,
5922
+ ( 11 , outbound_htlc_maximum_msat, option) ,
5907
5923
} ) ;
5908
5924
5909
5925
impl_writeable_tlv_based ! ( ChannelDetails , {
0 commit comments