Skip to content

Commit d91d4a5

Browse files
committed
f next
1 parent ba4bb6e commit d91d4a5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

fuzz/src/router.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
229229
is_usable: true, is_public: true,
230230
balance_msat: 0,
231231
outbound_capacity_msat: capacity * 1000,
232-
outbound_htlc_limit_msat: capacity * 1000
232+
next_outbound_htlc_limit_msat: capacity * 1000
233233
});
234234
}
235235
Some(&first_hops_vec[..])

lightning/src/ln/channelmanager.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ pub struct ChannelDetails {
10051005
/// to use a limit as close as possible to the HTLC limit we can currently send.
10061006
///
10071007
/// See also [`ChannelDetails::balance_msat`] and [`ChannelDetails::outbound_capacity_msat`].
1008-
pub outbound_htlc_limit_msat: u64,
1008+
pub next_outbound_htlc_limit_msat: u64,
10091009
/// The available inbound capacity for the remote peer to send HTLCs to us. This does not
10101010
/// include any pending HTLCs which are not yet fully resolved (and, thus, whose balance is not
10111011
/// available for inclusion in new inbound HTLCs).
@@ -1666,7 +1666,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
16661666
let channel_state = self.channel_state.lock().unwrap();
16671667
res.reserve(channel_state.by_id.len());
16681668
for (channel_id, channel) in channel_state.by_id.iter().filter(f) {
1669-
let (inbound_capacity_msat, outbound_capacity_msat, outbound_htlc_limit_msat) =
1669+
let (inbound_capacity_msat, outbound_capacity_msat, next_outbound_htlc_limit_msat) =
16701670
channel.get_inbound_outbound_available_balance_msat();
16711671
let balance_msat = channel.get_balance_msat();
16721672
let (to_remote_reserve_satoshis, to_self_reserve_satoshis) =
@@ -1690,7 +1690,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
16901690
balance_msat,
16911691
inbound_capacity_msat,
16921692
outbound_capacity_msat,
1693-
outbound_htlc_limit_msat,
1693+
next_outbound_htlc_limit_msat,
16941694
user_channel_id: channel.get_user_id(),
16951695
confirmations_required: channel.minimum_depth(),
16961696
force_close_spend_delay: channel.get_counterparty_selected_contest_delay(),
@@ -5922,7 +5922,7 @@ impl_writeable_tlv_based!(ChannelDetails, {
59225922
(18, outbound_capacity_msat, required),
59235923
// Note that by the time we get past the required read above, outbound_capacity_msat will be
59245924
// filled in, so we can safely unwrap it here.
5925-
(19, outbound_htlc_limit_msat, (default_value, outbound_capacity_msat.0.unwrap())),
5925+
(19, next_outbound_htlc_limit_msat, (default_value, outbound_capacity_msat.0.unwrap())),
59265926
(20, inbound_capacity_msat, required),
59275927
(22, confirmations_required, option),
59285928
(24, force_close_spend_delay, option),

lightning/src/routing/router.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ impl<'a> CandidateRouteHop<'a> {
412412
fn effective_capacity(&self) -> EffectiveCapacity {
413413
match self {
414414
CandidateRouteHop::FirstHop { details } => EffectiveCapacity::ExactLiquidity {
415-
liquidity_msat: details.outbound_htlc_limit_msat,
415+
liquidity_msat: details.next_outbound_htlc_limit_msat,
416416
},
417417
CandidateRouteHop::PublicHop { info, .. } => info.effective_capacity(),
418418
CandidateRouteHop::PrivateHop { .. } => EffectiveCapacity::Infinite,
@@ -1744,7 +1744,7 @@ mod tests {
17441744
user_channel_id: 0,
17451745
balance_msat: 0,
17461746
outbound_capacity_msat,
1747-
outbound_htlc_limit_msat: outbound_capacity_msat,
1747+
next_outbound_htlc_limit_msat: outbound_capacity_msat,
17481748
inbound_capacity_msat: 42,
17491749
unspendable_punishment_reserve: None,
17501750
confirmations_required: None,
@@ -5468,7 +5468,7 @@ mod benches {
54685468
user_channel_id: 0,
54695469
balance_msat: 10_000_000,
54705470
outbound_capacity_msat: 10_000_000,
5471-
outbound_htlc_limit_msat: 10_000_000,
5471+
next_outbound_htlc_limit_msat: 10_000_000,
54725472
inbound_capacity_msat: 0,
54735473
unspendable_punishment_reserve: None,
54745474
confirmations_required: None,

0 commit comments

Comments
 (0)