Skip to content

Commit cc920a8

Browse files
committed
f rename channel reserve values to to_*_reserve_satoshis
1 parent d1334d5 commit cc920a8

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

fuzz/src/router.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
214214
channel_value_satoshis: slice_to_be64(get_slice!(8)),
215215
user_id: 0,
216216
inbound_capacity_msat: 0,
217-
counterparty_selected_channel_reserve_satoshis: None,
218-
holder_selected_channel_reserve_satoshis: 0,
217+
to_self_reserve_satoshis: None,
218+
to_remote_reserve_satoshis: 0,
219219
confirmations_required: None, to_self_delay: None,
220220
is_outbound: true,
221221
is_funding_locked: true,

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,15 +665,15 @@ pub struct ChannelDetails {
665665
/// This value will be `None` for outbound channels until the counterparty accepts the channel.
666666
///
667667
/// [`outbound_capacity_msat`]: ChannelDetails::outbound_capacity_msat
668-
pub counterparty_selected_channel_reserve_satoshis: Option<u64>,
668+
pub to_self_reserve_satoshis: Option<u64>,
669669
/// The value, in satoshis, that must always be held in the channel for our counterparty. This
670670
/// value ensures that if our counterparty broadcasts a revoked state, we can punish them by
671671
/// claiming at least this value on chain.
672672
///
673673
/// This value is not included in [`inbound_capacity_msat`] as it can never be spent.
674674
///
675675
/// [`inbound_capacity_msat`]: ChannelDetails::inbound_capacity_msat
676-
pub holder_selected_channel_reserve_satoshis: u64,
676+
pub to_remote_reserve_satoshis: u64,
677677
/// The user_id passed in to create_channel, or 0 if the channel was inbound.
678678
pub user_id: u64,
679679
/// The available outbound capacity for sending HTLCs to the remote peer. This does not include
@@ -1195,7 +1195,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
11951195
res.reserve(channel_state.by_id.len());
11961196
for (channel_id, channel) in channel_state.by_id.iter().filter(f) {
11971197
let (inbound_capacity_msat, outbound_capacity_msat) = channel.get_inbound_outbound_available_balance_msat();
1198-
let (holder_selected_channel_reserve_satoshis, counterparty_selected_channel_reserve_satoshis) =
1198+
let (to_remote_reserve_satoshis, to_self_reserve_satoshis) =
11991199
channel.get_holder_counterparty_selected_channel_reserve_satoshis();
12001200
res.push(ChannelDetails {
12011201
channel_id: (*channel_id).clone(),
@@ -1204,8 +1204,8 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
12041204
remote_network_id: channel.get_counterparty_node_id(),
12051205
counterparty_features: InitFeatures::empty(),
12061206
channel_value_satoshis: channel.get_value_satoshis(),
1207-
counterparty_selected_channel_reserve_satoshis,
1208-
holder_selected_channel_reserve_satoshis,
1207+
to_self_reserve_satoshis,
1208+
to_remote_reserve_satoshis,
12091209
inbound_capacity_msat,
12101210
outbound_capacity_msat,
12111211
user_id: channel.get_user_id(),

lightning/src/routing/router.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,8 +1642,8 @@ mod tests {
16421642
user_id: 0,
16431643
outbound_capacity_msat: 100000,
16441644
inbound_capacity_msat: 100000,
1645-
counterparty_selected_channel_reserve_satoshis: None,
1646-
holder_selected_channel_reserve_satoshis: 0,
1645+
to_self_reserve_satoshis: None,
1646+
to_remote_reserve_satoshis: 0,
16471647
confirmations_required: None, to_self_delay: None,
16481648
is_outbound: true, is_funding_locked: true,
16491649
is_usable: true, is_public: true,
@@ -1965,8 +1965,8 @@ mod tests {
19651965
user_id: 0,
19661966
outbound_capacity_msat: 250_000_000,
19671967
inbound_capacity_msat: 0,
1968-
counterparty_selected_channel_reserve_satoshis: None,
1969-
holder_selected_channel_reserve_satoshis: 0,
1968+
to_self_reserve_satoshis: None,
1969+
to_remote_reserve_satoshis: 0,
19701970
confirmations_required: None, to_self_delay: None,
19711971
is_outbound: true, is_funding_locked: true,
19721972
is_usable: true, is_public: true,
@@ -2018,8 +2018,8 @@ mod tests {
20182018
user_id: 0,
20192019
outbound_capacity_msat: 250_000_000,
20202020
inbound_capacity_msat: 0,
2021-
counterparty_selected_channel_reserve_satoshis: None,
2022-
holder_selected_channel_reserve_satoshis: 0,
2021+
to_self_reserve_satoshis: None,
2022+
to_remote_reserve_satoshis: 0,
20232023
confirmations_required: None, to_self_delay: None,
20242024
is_outbound: true, is_funding_locked: true,
20252025
is_usable: true, is_public: true,
@@ -2088,8 +2088,8 @@ mod tests {
20882088
user_id: 0,
20892089
outbound_capacity_msat: 250_000_000,
20902090
inbound_capacity_msat: 0,
2091-
counterparty_selected_channel_reserve_satoshis: None,
2092-
holder_selected_channel_reserve_satoshis: 0,
2091+
to_self_reserve_satoshis: None,
2092+
to_remote_reserve_satoshis: 0,
20932093
confirmations_required: None, to_self_delay: None,
20942094
is_outbound: true, is_funding_locked: true,
20952095
is_usable: true, is_public: true,
@@ -2230,8 +2230,8 @@ mod tests {
22302230
user_id: 0,
22312231
outbound_capacity_msat: 250_000_000,
22322232
inbound_capacity_msat: 0,
2233-
counterparty_selected_channel_reserve_satoshis: None,
2234-
holder_selected_channel_reserve_satoshis: 0,
2233+
to_self_reserve_satoshis: None,
2234+
to_remote_reserve_satoshis: 0,
22352235
confirmations_required: None, to_self_delay: None,
22362236
is_outbound: true, is_funding_locked: true,
22372237
is_usable: true, is_public: true,
@@ -2364,8 +2364,8 @@ mod tests {
23642364
user_id: 0,
23652365
outbound_capacity_msat: 100000,
23662366
inbound_capacity_msat: 100000,
2367-
counterparty_selected_channel_reserve_satoshis: None,
2368-
holder_selected_channel_reserve_satoshis: 0,
2367+
to_self_reserve_satoshis: None,
2368+
to_remote_reserve_satoshis: 0,
23692369
confirmations_required: None, to_self_delay: None,
23702370
is_outbound: true, is_funding_locked: true,
23712371
is_usable: true, is_public: true,
@@ -2501,8 +2501,8 @@ mod tests {
25012501
user_id: 0,
25022502
outbound_capacity_msat: 200_000_000,
25032503
inbound_capacity_msat: 0,
2504-
counterparty_selected_channel_reserve_satoshis: None,
2505-
holder_selected_channel_reserve_satoshis: 0,
2504+
to_self_reserve_satoshis: None,
2505+
to_remote_reserve_satoshis: 0,
25062506
confirmations_required: None, to_self_delay: None,
25072507
is_outbound: true, is_funding_locked: true,
25082508
is_usable: true, is_public: true,

0 commit comments

Comments
 (0)