Skip to content

Commit 9a68dfa

Browse files
committed
Move announced_channel to ChannelHandshakeConfig
In the near future, we plan to allow users to update their `ChannelConfig` after the initial channel handshake. In order to reuse the same struct and expose it to users, we opt to move out all static fields that cannot be updated after the initial channel handshake. `announced_channel` is one of these fields. We now store it within the `Channel` struct, making sure we're backwards compatible to allow users to downgrade if necessary.
1 parent a551a62 commit 9a68dfa

File tree

8 files changed

+72
-53
lines changed

8 files changed

+72
-53
lines changed

lightning-invoice/src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ mod test {
659659
// `msgs::ChannelUpdate` is never handled for the node(s). As the `msgs::ChannelUpdate`
660660
// is never handled, the `channel.counterparty.forwarding_info` is never assigned.
661661
let mut private_chan_cfg = UserConfig::default();
662-
private_chan_cfg.channel_options.announced_channel = false;
662+
private_chan_cfg.own_channel_config.announced_channel = false;
663663
let temporary_channel_id = nodes[2].node.create_channel(nodes[0].node.get_our_node_id(), 1_000_000, 500_000_000, 42, Some(private_chan_cfg)).unwrap();
664664
let open_channel = get_event_msg!(nodes[2], MessageSendEvent::SendOpenChannel, nodes[0].node.get_our_node_id());
665665
nodes[0].node.handle_open_channel(&nodes[2].node.get_our_node_id(), InitFeatures::known(), &open_channel);
@@ -1046,7 +1046,7 @@ mod test {
10461046
// `msgs::ChannelUpdate` is never handled for the node(s). As the `msgs::ChannelUpdate`
10471047
// is never handled, the `channel.counterparty.forwarding_info` is never assigned.
10481048
let mut private_chan_cfg = UserConfig::default();
1049-
private_chan_cfg.channel_options.announced_channel = false;
1049+
private_chan_cfg.own_channel_config.announced_channel = false;
10501050
let temporary_channel_id = nodes[1].node.create_channel(nodes[3].node.get_our_node_id(), 1_000_000, 500_000_000, 42, Some(private_chan_cfg)).unwrap();
10511051
let open_channel = get_event_msg!(nodes[1], MessageSendEvent::SendOpenChannel, nodes[3].node.get_our_node_id());
10521052
nodes[3].node.handle_open_channel(&nodes[1].node.get_our_node_id(), InitFeatures::known(), &open_channel);

lightning/src/ln/channel.rs

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ pub(super) struct Channel<Signer: Sign> {
495495
#[cfg(not(any(test, feature = "_test_utils")))]
496496
config: ChannelConfig,
497497

498+
announced: bool,
498499
inbound_handshake_limits_override: Option<ChannelHandshakeLimits>,
499500

500501
user_id: u64,
@@ -855,7 +856,7 @@ impl<Signer: Sign> Channel<Signer> {
855856
// available. If it's private, we first try `scid_privacy` as it provides better privacy
856857
// with no other changes, and fall back to `only_static_remotekey`
857858
let mut ret = ChannelTypeFeatures::only_static_remote_key();
858-
if !config.channel_options.announced_channel && config.own_channel_config.negotiate_scid_privacy {
859+
if !config.own_channel_config.announced_channel && config.own_channel_config.negotiate_scid_privacy {
859860
ret.set_scid_privacy_required();
860861
}
861862
ret
@@ -928,9 +929,17 @@ impl<Signer: Sign> Channel<Signer> {
928929
}
929930
}
930931

932+
// Also update `ChannelConfig::announced_channel` to make sure we still allow users to
933+
// downgrade versions after the fact.
934+
//
935+
// TODO: This can be removed once we prevent downgrades to v0.0.107.
936+
let mut channel_options = config.channel_options.clone();
937+
channel_options.announced_channel = config.own_channel_config.announced_channel;
938+
931939
Ok(Channel {
932940
user_id,
933-
config: config.channel_options.clone(),
941+
config: channel_options,
942+
announced: config.own_channel_config.announced_channel,
934943
inbound_handshake_limits_override: Some(config.peer_channel_config_limits.clone()),
935944

936945
channel_id: keys_provider.get_secure_random_bytes(),
@@ -1117,7 +1126,6 @@ impl<Signer: Sign> Channel<Signer> {
11171126
delayed_payment_basepoint: msg.delayed_payment_basepoint,
11181127
htlc_basepoint: msg.htlc_basepoint
11191128
};
1120-
let mut local_config = (*config).channel_options.clone();
11211129

11221130
if config.own_channel_config.our_to_self_delay < BREAKDOWN_TIMEOUT {
11231131
return Err(ChannelError::Close(format!("Configured with an unreasonable our_to_self_delay ({}) putting user funds at risks. It must be greater than {}", config.own_channel_config.our_to_self_delay, BREAKDOWN_TIMEOUT)));
@@ -1181,13 +1189,18 @@ impl<Signer: Sign> Channel<Signer> {
11811189

11821190
// Convert things into internal flags and prep our state:
11831191

1192+
// We either accept their preference or the preferences match.
11841193
if config.peer_channel_config_limits.force_announced_channel_preference {
1185-
if local_config.announced_channel != announced_channel {
1194+
if config.own_channel_config.announced_channel != announced_channel {
11861195
return Err(ChannelError::Close("Peer tried to open channel but their announcement preference is different from ours".to_owned()));
11871196
}
11881197
}
1189-
// we either accept their preference or the preferences match
1190-
local_config.announced_channel = announced_channel;
1198+
// Also update `ChannelConfig::announced_channel` to make sure we still allow users to
1199+
// downgrade versions after the fact.
1200+
//
1201+
// TODO: This can be removed once we prevent downgrades to v0.0.107.
1202+
let mut channel_options = config.channel_options.clone();
1203+
channel_options.announced_channel = announced_channel;
11911204

11921205
let holder_selected_channel_reserve_satoshis = Channel::<Signer>::get_holder_selected_channel_reserve_satoshis(msg.funding_satoshis);
11931206
if holder_selected_channel_reserve_satoshis < MIN_CHAN_DUST_LIMIT_SATOSHIS {
@@ -1254,7 +1267,8 @@ impl<Signer: Sign> Channel<Signer> {
12541267

12551268
let chan = Channel {
12561269
user_id,
1257-
config: local_config,
1270+
config: channel_options,
1271+
announced: announced_channel,
12581272
inbound_handshake_limits_override: None,
12591273

12601274
channel_id: msg.temporary_channel_id,
@@ -4556,7 +4570,7 @@ impl<Signer: Sign> Channel<Signer> {
45564570
}
45574571

45584572
pub fn should_announce(&self) -> bool {
4559-
self.config.announced_channel
4573+
self.announced
45604574
}
45614575

45624576
pub fn is_outbound(&self) -> bool {
@@ -4896,7 +4910,7 @@ impl<Signer: Sign> Channel<Signer> {
48964910
delayed_payment_basepoint: keys.delayed_payment_basepoint,
48974911
htlc_basepoint: keys.htlc_basepoint,
48984912
first_per_commitment_point,
4899-
channel_flags: if self.config.announced_channel {1} else {0},
4913+
channel_flags: if self.announced {1} else {0},
49004914
shutdown_scriptpubkey: OptionalField::Present(match &self.shutdown_scriptpubkey {
49014915
Some(script) => script.clone().into_inner(),
49024916
None => Builder::new().into_script(),
@@ -5046,7 +5060,7 @@ impl<Signer: Sign> Channel<Signer> {
50465060
///
50475061
/// This will only return ChannelError::Ignore upon failure.
50485062
fn get_channel_announcement(&self, node_id: PublicKey, chain_hash: BlockHash) -> Result<msgs::UnsignedChannelAnnouncement, ChannelError> {
5049-
if !self.config.announced_channel {
5063+
if !self.announced {
50505064
return Err(ChannelError::Ignore("Channel is not available for public announcements".to_owned()));
50515065
}
50525066
if !self.is_usable() {
@@ -6007,6 +6021,7 @@ impl<Signer: Sign> Writeable for Channel<Signer> {
60076021
(17, self.announcement_sigs_state, required),
60086022
(19, self.latest_inbound_scid_alias, option),
60096023
(21, self.outbound_scid_alias, required),
6024+
(23, self.announced, required),
60106025
});
60116026

60126027
Ok(())
@@ -6264,6 +6279,7 @@ impl<'a, Signer: Sign, K: Deref> ReadableArgs<(&'a K, u32)> for Channel<Signer>
62646279
let mut announcement_sigs_state = Some(AnnouncementSigsState::NotSent);
62656280
let mut latest_inbound_scid_alias = None;
62666281
let mut outbound_scid_alias = None;
6282+
let mut announced = None;
62676283

62686284
read_tlv_fields!(reader, {
62696285
(0, announcement_sigs, option),
@@ -6281,6 +6297,7 @@ impl<'a, Signer: Sign, K: Deref> ReadableArgs<(&'a K, u32)> for Channel<Signer>
62816297
(17, announcement_sigs_state, option),
62826298
(19, latest_inbound_scid_alias, option),
62836299
(21, outbound_scid_alias, option),
6300+
(23, announced, option),
62846301
});
62856302

62866303
if let Some(preimages) = preimages_opt {
@@ -6321,6 +6338,7 @@ impl<'a, Signer: Sign, K: Deref> ReadableArgs<(&'a K, u32)> for Channel<Signer>
63216338
user_id,
63226339

63236340
config: config.unwrap(),
6341+
announced: announced.unwrap_or(config.unwrap().announced_channel),
63246342

63256343
// Note that we don't care about serializing handshake limits as we only ever serialize
63266344
// channel data after the handshake has completed.
@@ -6918,7 +6936,7 @@ mod tests {
69186936

69196937
let counterparty_node_id = PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&[42; 32]).unwrap());
69206938
let mut config = UserConfig::default();
6921-
config.channel_options.announced_channel = false;
6939+
config.own_channel_config.announced_channel = false;
69226940
let mut chan = Channel::<InMemorySigner>::new_outbound(&&feeest, &&keys_provider, counterparty_node_id, &InitFeatures::known(), 10_000_000, 100000, 42, &config, 0, 42).unwrap(); // Nothing uses their network key in this test
69236941
chan.holder_dust_limit_satoshis = 546;
69246942
chan.counterparty_selected_channel_reserve_satoshis = Some(0); // Filled in in accept_channel

lightning/src/ln/functional_test_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ pub fn create_announced_chan_between_nodes_with_value<'a, 'b, 'c, 'd>(nodes: &'a
772772

773773
pub fn create_unannounced_chan_between_nodes_with_value<'a, 'b, 'c, 'd>(nodes: &'a Vec<Node<'b, 'c, 'd>>, a: usize, b: usize, channel_value: u64, push_msat: u64, a_flags: InitFeatures, b_flags: InitFeatures) -> (msgs::ChannelReady, Transaction) {
774774
let mut no_announce_cfg = test_default_channel_config();
775-
no_announce_cfg.channel_options.announced_channel = false;
775+
no_announce_cfg.own_channel_config.announced_channel = false;
776776
nodes[a].node.create_channel(nodes[b].node.get_our_node_id(), channel_value, push_msat, 42, Some(no_announce_cfg)).unwrap();
777777
let open_channel = get_event_msg!(nodes[a], MessageSendEvent::SendOpenChannel, nodes[b].node.get_our_node_id());
778778
nodes[b].node.handle_open_channel(&nodes[a].node.get_our_node_id(), a_flags, &open_channel);
@@ -1956,7 +1956,7 @@ pub fn test_default_channel_config() -> UserConfig {
19561956
// Set cltv_expiry_delta slightly lower to keep the final CLTV values inside one byte in our
19571957
// tests so that our script-length checks don't fail (see ACCEPTED_HTLC_SCRIPT_WEIGHT).
19581958
default_config.channel_options.cltv_expiry_delta = MIN_CLTV_EXPIRY_DELTA;
1959-
default_config.channel_options.announced_channel = true;
1959+
default_config.own_channel_config.announced_channel = true;
19601960
default_config.peer_channel_config_limits.force_announced_channel_preference = false;
19611961
// When most of our tests were written, the default HTLC minimum was fixed at 1000.
19621962
// It now defaults to 1, so we simply set it to the expected value here.

lightning/src/ln/functional_tests.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,11 +2362,11 @@ fn channel_monitor_network_test() {
23622362
fn test_justice_tx() {
23632363
// Test justice txn built on revoked HTLC-Success tx, against both sides
23642364
let mut alice_config = UserConfig::default();
2365-
alice_config.channel_options.announced_channel = true;
2365+
alice_config.own_channel_config.announced_channel = true;
23662366
alice_config.peer_channel_config_limits.force_announced_channel_preference = false;
23672367
alice_config.own_channel_config.our_to_self_delay = 6 * 24 * 5;
23682368
let mut bob_config = UserConfig::default();
2369-
bob_config.channel_options.announced_channel = true;
2369+
bob_config.own_channel_config.announced_channel = true;
23702370
bob_config.peer_channel_config_limits.force_announced_channel_preference = false;
23712371
bob_config.own_channel_config.our_to_self_delay = 6 * 24 * 3;
23722372
let user_cfgs = [Some(alice_config), Some(bob_config)];
@@ -8282,16 +8282,16 @@ fn test_channel_update_has_correct_htlc_maximum_msat() {
82828282
// 2. MUST be set to less than or equal to the `max_htlc_value_in_flight_msat` received from the peer.
82838283

82848284
let mut config_30_percent = UserConfig::default();
8285-
config_30_percent.channel_options.announced_channel = true;
8285+
config_30_percent.own_channel_config.announced_channel = true;
82868286
config_30_percent.own_channel_config.max_inbound_htlc_value_in_flight_percent_of_channel = 30;
82878287
let mut config_50_percent = UserConfig::default();
8288-
config_50_percent.channel_options.announced_channel = true;
8288+
config_50_percent.own_channel_config.announced_channel = true;
82898289
config_50_percent.own_channel_config.max_inbound_htlc_value_in_flight_percent_of_channel = 50;
82908290
let mut config_95_percent = UserConfig::default();
8291-
config_95_percent.channel_options.announced_channel = true;
8291+
config_95_percent.own_channel_config.announced_channel = true;
82928292
config_95_percent.own_channel_config.max_inbound_htlc_value_in_flight_percent_of_channel = 95;
82938293
let mut config_100_percent = UserConfig::default();
8294-
config_100_percent.channel_options.announced_channel = true;
8294+
config_100_percent.own_channel_config.announced_channel = true;
82958295
config_100_percent.own_channel_config.max_inbound_htlc_value_in_flight_percent_of_channel = 100;
82968296

82978297
let chanmon_cfgs = create_chanmon_cfgs(4);

lightning/src/ln/onion_route_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ fn test_onion_failure() {
308308
// Channel::get_counterparty_htlc_minimum_msat().
309309
let mut node_2_cfg: UserConfig = Default::default();
310310
node_2_cfg.own_channel_config.our_htlc_minimum_msat = 2000;
311-
node_2_cfg.channel_options.announced_channel = true;
311+
node_2_cfg.own_channel_config.announced_channel = true;
312312
node_2_cfg.peer_channel_config_limits.force_announced_channel_preference = false;
313313

314314
// When this test was written, the default base fee floated based on the HTLC count.
@@ -600,7 +600,7 @@ fn test_default_to_onion_payload_tlv_format() {
600600
// `features` for a node in the `network_graph` exists, or when the node isn't in the
601601
// `network_graph`, and no other known `features` for the node exists.
602602
let mut priv_channels_conf = UserConfig::default();
603-
priv_channels_conf.channel_options.announced_channel = false;
603+
priv_channels_conf.own_channel_config.announced_channel = false;
604604
let chanmon_cfgs = create_chanmon_cfgs(5);
605605
let node_cfgs = create_node_cfgs(5, &chanmon_cfgs);
606606
let node_chanmgrs = create_node_chanmgrs(5, &node_cfgs, &[None, None, None, None, Some(priv_channels_conf)]);
@@ -1085,7 +1085,7 @@ fn test_phantom_dust_exposure_failure() {
10851085
let max_dust_exposure = 546;
10861086
let mut receiver_config = UserConfig::default();
10871087
receiver_config.channel_options.max_dust_htlc_exposure_msat = max_dust_exposure;
1088-
receiver_config.channel_options.announced_channel = true;
1088+
receiver_config.own_channel_config.announced_channel = true;
10891089

10901090
let chanmon_cfgs = create_chanmon_cfgs(2);
10911091
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);

lightning/src/ln/priv_short_conf_tests.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ fn do_test_1_conf_open(connect_style: ConnectStyle) {
171171
// tests that we properly send one in that case.
172172
let mut alice_config = UserConfig::default();
173173
alice_config.own_channel_config.minimum_depth = 1;
174-
alice_config.channel_options.announced_channel = true;
174+
alice_config.own_channel_config.announced_channel = true;
175175
alice_config.peer_channel_config_limits.force_announced_channel_preference = false;
176176
let mut bob_config = UserConfig::default();
177177
bob_config.own_channel_config.minimum_depth = 1;
178-
bob_config.channel_options.announced_channel = true;
178+
bob_config.own_channel_config.announced_channel = true;
179179
bob_config.peer_channel_config_limits.force_announced_channel_preference = false;
180180
let chanmon_cfgs = create_chanmon_cfgs(2);
181181
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
@@ -308,7 +308,7 @@ fn test_scid_privacy_on_pub_channel() {
308308
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
309309

310310
let mut scid_privacy_cfg = test_default_channel_config();
311-
scid_privacy_cfg.channel_options.announced_channel = true;
311+
scid_privacy_cfg.own_channel_config.announced_channel = true;
312312
scid_privacy_cfg.own_channel_config.negotiate_scid_privacy = true;
313313
nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), 100000, 10001, 42, Some(scid_privacy_cfg)).unwrap();
314314
let mut open_channel = get_event_msg!(nodes[0], MessageSendEvent::SendOpenChannel, nodes[1].node.get_our_node_id());
@@ -332,7 +332,7 @@ fn test_scid_privacy_negotiation() {
332332
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
333333

334334
let mut scid_privacy_cfg = test_default_channel_config();
335-
scid_privacy_cfg.channel_options.announced_channel = false;
335+
scid_privacy_cfg.own_channel_config.announced_channel = false;
336336
scid_privacy_cfg.own_channel_config.negotiate_scid_privacy = true;
337337
nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), 100000, 10001, 42, Some(scid_privacy_cfg)).unwrap();
338338

@@ -378,7 +378,7 @@ fn test_inbound_scid_privacy() {
378378
create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 1_000_000, 0, InitFeatures::known(), InitFeatures::known());
379379

380380
let mut no_announce_cfg = test_default_channel_config();
381-
no_announce_cfg.channel_options.announced_channel = false;
381+
no_announce_cfg.own_channel_config.announced_channel = false;
382382
no_announce_cfg.own_channel_config.negotiate_scid_privacy = true;
383383
nodes[1].node.create_channel(nodes[2].node.get_our_node_id(), 100_000, 10_000, 42, Some(no_announce_cfg)).unwrap();
384384
let mut open_channel = get_event_msg!(nodes[1], MessageSendEvent::SendOpenChannel, nodes[2].node.get_our_node_id());
@@ -665,7 +665,7 @@ fn test_0conf_channel_with_async_monitor() {
665665

666666
create_announced_chan_between_nodes_with_value(&nodes, 1, 2, 1_000_000, 0, InitFeatures::known(), InitFeatures::known());
667667

668-
chan_config.channel_options.announced_channel = false;
668+
chan_config.own_channel_config.announced_channel = false;
669669
nodes[0].node.create_channel(nodes[1].node.get_our_node_id(), 100000, 10001, 42, Some(chan_config)).unwrap();
670670
let open_channel = get_event_msg!(nodes[0], MessageSendEvent::SendOpenChannel, nodes[1].node.get_our_node_id());
671671

@@ -811,7 +811,7 @@ fn test_0conf_close_no_early_chan_update() {
811811
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
812812

813813
// This is the default but we force it on anyway
814-
chan_config.channel_options.announced_channel = true;
814+
chan_config.own_channel_config.announced_channel = true;
815815
open_zero_conf_channel(&nodes[0], &nodes[1], Some(chan_config));
816816

817817
// We can use the channel immediately, but won't generate a channel_update until we get confs
@@ -835,7 +835,7 @@ fn test_public_0conf_channel() {
835835
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
836836

837837
// This is the default but we force it on anyway
838-
chan_config.channel_options.announced_channel = true;
838+
chan_config.own_channel_config.announced_channel = true;
839839
let tx = open_zero_conf_channel(&nodes[0], &nodes[1], Some(chan_config));
840840

841841
// We can use the channel immediately, but we can't announce it until we get 6+ confirmations
@@ -888,7 +888,7 @@ fn test_0conf_channel_reorg() {
888888
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
889889

890890
// This is the default but we force it on anyway
891-
chan_config.channel_options.announced_channel = true;
891+
chan_config.own_channel_config.announced_channel = true;
892892
let tx = open_zero_conf_channel(&nodes[0], &nodes[1], Some(chan_config));
893893

894894
// We can use the channel immediately, but we can't announce it until we get 6+ confirmations

lightning/src/ln/shutdown_tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ fn test_upfront_shutdown_script() {
409409
// enforce it at shutdown message
410410

411411
let mut config = UserConfig::default();
412-
config.channel_options.announced_channel = true;
412+
config.own_channel_config.announced_channel = true;
413413
config.peer_channel_config_limits.force_announced_channel_preference = false;
414414
config.channel_options.commit_upfront_shutdown_pubkey = false;
415415
let user_cfgs = [None, Some(config), None];
@@ -574,7 +574,7 @@ fn test_invalid_upfront_shutdown_script() {
574574
#[test]
575575
fn test_segwit_v0_shutdown_script() {
576576
let mut config = UserConfig::default();
577-
config.channel_options.announced_channel = true;
577+
config.own_channel_config.announced_channel = true;
578578
config.peer_channel_config_limits.force_announced_channel_preference = false;
579579
config.channel_options.commit_upfront_shutdown_pubkey = false;
580580
let user_cfgs = [None, Some(config), None];
@@ -609,7 +609,7 @@ fn test_segwit_v0_shutdown_script() {
609609
#[test]
610610
fn test_anysegwit_shutdown_script() {
611611
let mut config = UserConfig::default();
612-
config.channel_options.announced_channel = true;
612+
config.own_channel_config.announced_channel = true;
613613
config.peer_channel_config_limits.force_announced_channel_preference = false;
614614
config.channel_options.commit_upfront_shutdown_pubkey = false;
615615
let user_cfgs = [None, Some(config), None];
@@ -644,7 +644,7 @@ fn test_anysegwit_shutdown_script() {
644644
#[test]
645645
fn test_unsupported_anysegwit_shutdown_script() {
646646
let mut config = UserConfig::default();
647-
config.channel_options.announced_channel = true;
647+
config.own_channel_config.announced_channel = true;
648648
config.peer_channel_config_limits.force_announced_channel_preference = false;
649649
config.channel_options.commit_upfront_shutdown_pubkey = false;
650650
let user_cfgs = [None, Some(config), None];
@@ -686,7 +686,7 @@ fn test_unsupported_anysegwit_shutdown_script() {
686686
#[test]
687687
fn test_invalid_shutdown_script() {
688688
let mut config = UserConfig::default();
689-
config.channel_options.announced_channel = true;
689+
config.own_channel_config.announced_channel = true;
690690
config.peer_channel_config_limits.force_announced_channel_preference = false;
691691
config.channel_options.commit_upfront_shutdown_pubkey = false;
692692
let user_cfgs = [None, Some(config), None];

0 commit comments

Comments
 (0)