File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,11 @@ pub struct Config {
181
181
pub route_parameters : Option < RouteParametersConfig > ,
182
182
/// Whether to enable the static invoice service to support async payment reception for clients.
183
183
pub async_payment_services_enabled : bool ,
184
+ /// If this is set to true, then if we as an often-offline payer receive a [`StaticInvoice`] to
185
+ /// pay, we will attempt to hold the corresponding outbound HTLCs with our next-hop channel
186
+ /// counterparty(s) that support the `htlc_hold` feature. This allows our node to go offline once
187
+ /// the HTLCs are locked in even though the recipient may not yet be online to receive them.
188
+ pub hold_outbound_htlcs_at_next_hop : bool ,
184
189
}
185
190
186
191
impl Default for Config {
@@ -196,6 +201,7 @@ impl Default for Config {
196
201
route_parameters : None ,
197
202
node_alias : None ,
198
203
async_payment_services_enabled : false ,
204
+ hold_outbound_htlcs_at_next_hop : false ,
199
205
}
200
206
}
201
207
}
@@ -333,6 +339,9 @@ pub(crate) fn default_user_config(config: &Config) -> UserConfig {
333
339
if config. async_payment_services_enabled {
334
340
user_config. enable_htlc_hold = true ;
335
341
}
342
+ if config. hold_outbound_htlcs_at_next_hop {
343
+ user_config. hold_outbound_htlcs_at_next_hop = true ;
344
+ }
336
345
337
346
user_config
338
347
}
Original file line number Diff line number Diff line change @@ -1139,6 +1139,7 @@ fn async_payment() {
1139
1139
let mut config_sender = random_config ( true ) ;
1140
1140
config_sender. node_config . listening_addresses = None ;
1141
1141
config_sender. node_config . node_alias = None ;
1142
+ config_sender. node_config . hold_outbound_htlcs_at_next_hop = true ;
1142
1143
config_sender. log_writer =
1143
1144
TestLogWriter :: Custom ( Arc :: new ( MultiNodeLogger :: new ( "sender " . to_string ( ) ) ) ) ;
1144
1145
let node_sender = setup_node ( & chain_source, config_sender, None ) ;
You can’t perform that action at this time.
0 commit comments