X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchannel.rs;h=c9e5000073249deea92b746131270b9ac9a9369e;hb=8027c2ff06c790016b1a9e1d67af065c44d2995d;hp=4daaf630ac4e57bd7c96ed73e401badf986236d1;hpb=ab20284e2673e946ebdffcd5be7388de917a168f;p=rust-lightning diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 4daaf630..c9e50000 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -855,7 +855,7 @@ impl Channel { // available. If it's private, we first try `scid_privacy` as it provides better privacy // with no other changes, and fall back to `only_static_remotekey` let mut ret = ChannelTypeFeatures::only_static_remote_key(); - if !config.channel_options.announced_channel && config.own_channel_config.negotiate_scid_privacy { + if !config.own_channel_config.announced_channel && config.own_channel_config.negotiate_scid_privacy { ret.set_scid_privacy_required(); } ret @@ -918,7 +918,7 @@ impl Channel { let mut secp_ctx = Secp256k1::new(); secp_ctx.seeded_randomize(&keys_provider.get_secure_random_bytes()); - let shutdown_scriptpubkey = if config.channel_options.commit_upfront_shutdown_pubkey { + let shutdown_scriptpubkey = if config.own_channel_config.commit_upfront_shutdown_pubkey { Some(keys_provider.get_shutdown_scriptpubkey()) } else { None }; @@ -1182,7 +1182,7 @@ impl Channel { // Convert things into internal flags and prep our state: if config.peer_channel_config_limits.force_announced_channel_preference { - if local_config.announced_channel != announced_channel { + if config.own_channel_config.announced_channel != announced_channel { return Err(ChannelError::Close("Peer tried to open channel but their announcement preference is different from ours".to_owned())); } } @@ -1239,7 +1239,7 @@ impl Channel { } } else { None }; - let shutdown_scriptpubkey = if config.channel_options.commit_upfront_shutdown_pubkey { + let shutdown_scriptpubkey = if config.own_channel_config.commit_upfront_shutdown_pubkey { Some(keys_provider.get_shutdown_scriptpubkey()) } else { None }; @@ -6918,7 +6918,7 @@ mod tests { let counterparty_node_id = PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&[42; 32]).unwrap()); let mut config = UserConfig::default(); - config.channel_options.announced_channel = false; + config.own_channel_config.announced_channel = false; let mut chan = Channel::::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 chan.holder_dust_limit_satoshis = 546; chan.counterparty_selected_channel_reserve_satoshis = Some(0); // Filled in in accept_channel