@@ -1274,8 +1274,14 @@ pub struct ChannelDetails {
1274
1274
/// the current state and per-HTLC limit(s). This is intended for use when routing, allowing us
1275
1275
/// to use a limit as close as possible to the HTLC limit we can currently send.
1276
1276
///
1277
- /// See also [`ChannelDetails::balance_msat`] and [`ChannelDetails::outbound_capacity_msat`].
1277
+ /// See also [`ChannelDetails::next_outbound_htlc_minimum_msat`],
1278
+ /// [`ChannelDetails::balance_msat`], and [`ChannelDetails::outbound_capacity_msat`].
1278
1279
pub next_outbound_htlc_limit_msat : u64 ,
1280
+ /// The minimum value for sending a single HTLC to the remote peer. This is the equivalent of
1281
+ /// [`ChannelDetails::next_outbound_htlc_limit_msat`] but represents a lower-bound, rather than
1282
+ /// an upper-bound. This is intended for use when routing, allowing us to ensure we pick a
1283
+ /// route which is valid.
1284
+ pub next_outbound_htlc_minimum_msat : u64 ,
1279
1285
/// The available inbound capacity for the remote peer to send HTLCs to us. This does not
1280
1286
/// include any pending HTLCs which are not yet fully resolved (and, thus, whose balance is not
1281
1287
/// available for inclusion in new inbound HTLCs).
@@ -1395,6 +1401,7 @@ impl ChannelDetails {
1395
1401
inbound_capacity_msat : balance. inbound_capacity_msat ,
1396
1402
outbound_capacity_msat : balance. outbound_capacity_msat ,
1397
1403
next_outbound_htlc_limit_msat : balance. next_outbound_htlc_limit_msat ,
1404
+ next_outbound_htlc_minimum_msat : balance. next_outbound_htlc_min_msat ,
1398
1405
user_channel_id : channel. get_user_id ( ) ,
1399
1406
confirmations_required : channel. minimum_depth ( ) ,
1400
1407
confirmations : Some ( channel. get_funding_tx_confirmations ( best_block_height) ) ,
@@ -6951,10 +6958,9 @@ impl Writeable for ChannelDetails {
6951
6958
( 14 , user_channel_id_low, required) ,
6952
6959
( 16 , self . balance_msat, required) ,
6953
6960
( 18 , self . outbound_capacity_msat, required) ,
6954
- // Note that by the time we get past the required read above, outbound_capacity_msat will be
6955
- // filled in, so we can safely unwrap it here.
6956
- ( 19 , self . next_outbound_htlc_limit_msat, ( default_value, outbound_capacity_msat. 0 . unwrap( ) as u64 ) ) ,
6961
+ ( 19 , self . next_outbound_htlc_limit_msat, required) ,
6957
6962
( 20 , self . inbound_capacity_msat, required) ,
6963
+ ( 21 , self . next_outbound_htlc_minimum_msat, required) ,
6958
6964
( 22 , self . confirmations_required, option) ,
6959
6965
( 24 , self . force_close_spend_delay, option) ,
6960
6966
( 26 , self . is_outbound, required) ,
@@ -6991,6 +6997,7 @@ impl Readable for ChannelDetails {
6991
6997
// filled in, so we can safely unwrap it here.
6992
6998
( 19 , next_outbound_htlc_limit_msat, ( default_value, outbound_capacity_msat. 0 . unwrap( ) as u64 ) ) ,
6993
6999
( 20 , inbound_capacity_msat, required) ,
7000
+ ( 21 , next_outbound_htlc_minimum_msat, ( default_value, 0 ) ) ,
6994
7001
( 22 , confirmations_required, option) ,
6995
7002
( 24 , force_close_spend_delay, option) ,
6996
7003
( 26 , is_outbound, required) ,
@@ -7024,6 +7031,7 @@ impl Readable for ChannelDetails {
7024
7031
balance_msat : balance_msat. 0 . unwrap ( ) ,
7025
7032
outbound_capacity_msat : outbound_capacity_msat. 0 . unwrap ( ) ,
7026
7033
next_outbound_htlc_limit_msat : next_outbound_htlc_limit_msat. 0 . unwrap ( ) ,
7034
+ next_outbound_htlc_minimum_msat : next_outbound_htlc_minimum_msat. 0 . unwrap ( ) ,
7027
7035
inbound_capacity_msat : inbound_capacity_msat. 0 . unwrap ( ) ,
7028
7036
confirmations_required,
7029
7037
confirmations,
0 commit comments