Skip to content

Commit b454d2b

Browse files
committed
Rename field to LSPS2ServiceConfig::disable_client_reserve
1 parent e3dd7a7 commit b454d2b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/liquidity.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub struct LSPS2ServiceConfig {
145145
/// When set, we will allow clients to spend their entire channel balance in the channels
146146
/// we open to them. This allows clients to try to steal your channel balance with
147147
/// no financial penalty, so this should only be set if you trust your clients.
148-
pub allow_client_0reserve: bool,
148+
pub disable_client_reserve: bool,
149149
}
150150

151151
pub(crate) struct LiquiditySourceBuilder<L: Deref>
@@ -792,7 +792,7 @@ where
792792
config.channel_config.forwarding_fee_base_msat = 0;
793793
config.channel_config.forwarding_fee_proportional_millionths = 0;
794794

795-
let result = if service_config.allow_client_0reserve {
795+
let result = if service_config.disable_client_reserve {
796796
self.channel_manager.create_channel_to_trusted_peer_0reserve(
797797
their_network_key,
798798
channel_amount_sats,
@@ -819,7 +819,7 @@ where
819819
// the pending requests and regularly retry opening the channel until we
820820
// succeed.
821821
let zero_reserve_string =
822-
if service_config.allow_client_0reserve { "0reserve " } else { "" };
822+
if service_config.disable_client_reserve { "0reserve " } else { "" };
823823
log_error!(
824824
self.logger,
825825
"Failed to open LSPS2 {}channel to {}: {:?}",

tests/integration_tests_rust.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ async fn do_lsps2_client_service_integration(client_trusts_lsp: bool) {
17861786
min_channel_opening_fee_msat: 0,
17871787
max_client_to_self_delay: 1024,
17881788
client_trusts_lsp,
1789-
allow_client_0reserve: false,
1789+
disable_client_reserve: false,
17901790
};
17911791

17921792
let service_config = random_config(true);
@@ -2105,7 +2105,7 @@ async fn lsps2_client_trusts_lsp() {
21052105
min_channel_opening_fee_msat: 0,
21062106
max_client_to_self_delay: 1024,
21072107
client_trusts_lsp: true,
2108-
allow_client_0reserve: false,
2108+
disable_client_reserve: false,
21092109
};
21102110

21112111
let service_config = random_config(true);
@@ -2280,7 +2280,7 @@ async fn lsps2_lsp_trusts_client_but_client_does_not_claim() {
22802280
min_channel_opening_fee_msat: 0,
22812281
max_client_to_self_delay: 1024,
22822282
client_trusts_lsp: false,
2283-
allow_client_0reserve: false,
2283+
disable_client_reserve: false,
22842284
};
22852285

22862286
let service_config = random_config(true);

0 commit comments

Comments
 (0)