@@ -1523,7 +1523,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
1523
1523
SP::Target: SignerProvider,
1524
1524
{
1525
1525
let logger = WithContext::from(logger, Some(counterparty_node_id), Some(open_channel_fields.temporary_channel_id), None);
1526
- let announced_channel = if (open_channel_fields.channel_flags & 1) == 1 { true } else { false };
1526
+ let announce_for_forwarding = if (open_channel_fields.channel_flags & 1) == 1 { true } else { false };
1527
1527
1528
1528
let channel_value_satoshis = our_funding_satoshis.saturating_add(open_channel_fields.funding_satoshis);
1529
1529
@@ -1597,7 +1597,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
1597
1597
// Convert things into internal flags and prep our state:
1598
1598
1599
1599
if config.channel_handshake_limits.force_announced_channel_preference {
1600
- if config.channel_handshake_config.announced_channel != announced_channel {
1600
+ if config.channel_handshake_config.announce_for_forwarding != announce_for_forwarding {
1601
1601
return Err(ChannelError::close("Peer tried to open channel but their announcement preference is different from ours".to_owned()));
1602
1602
}
1603
1603
}
@@ -1697,7 +1697,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
1697
1697
1698
1698
config: LegacyChannelConfig {
1699
1699
options: config.channel_config.clone(),
1700
- announced_channel ,
1700
+ announce_for_forwarding ,
1701
1701
commit_upfront_shutdown_pubkey: config.channel_handshake_config.commit_upfront_shutdown_pubkey,
1702
1702
},
1703
1703
@@ -1931,7 +1931,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
1931
1931
1932
1932
config: LegacyChannelConfig {
1933
1933
options: config.channel_config.clone(),
1934
- announced_channel : config.channel_handshake_config.announced_channel ,
1934
+ announce_for_forwarding : config.channel_handshake_config.announce_for_forwarding ,
1935
1935
commit_upfront_shutdown_pubkey: config.channel_handshake_config.commit_upfront_shutdown_pubkey,
1936
1936
},
1937
1937
@@ -2078,7 +2078,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2078
2078
}
2079
2079
2080
2080
pub fn should_announce(&self) -> bool {
2081
- self.config.announced_channel
2081
+ self.config.announce_for_forwarding
2082
2082
}
2083
2083
2084
2084
pub fn is_outbound(&self) -> bool {
@@ -6969,7 +6969,7 @@ impl<SP: Deref> Channel<SP> where
6969
6969
fn get_channel_announcement<NS: Deref>(
6970
6970
&self, node_signer: &NS, chain_hash: ChainHash, user_config: &UserConfig,
6971
6971
) -> Result<msgs::UnsignedChannelAnnouncement, ChannelError> where NS::Target: NodeSigner {
6972
- if !self.context.config.announced_channel {
6972
+ if !self.context.config.announce_for_forwarding {
6973
6973
return Err(ChannelError::Ignore("Channel is not available for public announcements".to_owned()));
6974
6974
}
6975
6975
if !self.context.is_usable() {
@@ -7827,7 +7827,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
7827
7827
delayed_payment_basepoint: keys.delayed_payment_basepoint.to_public_key(),
7828
7828
htlc_basepoint: keys.htlc_basepoint.to_public_key(),
7829
7829
first_per_commitment_point,
7830
- channel_flags: if self.context.config.announced_channel {1} else {0},
7830
+ channel_flags: if self.context.config.announce_for_forwarding {1} else {0},
7831
7831
shutdown_scriptpubkey: Some(match &self.context.shutdown_scriptpubkey {
7832
7832
Some(script) => script.clone().into_inner(),
7833
7833
None => Builder::new().into_script(),
@@ -7992,8 +7992,8 @@ pub(super) fn channel_type_from_open_channel(
7992
7992
if channel_type.requires_unknown_bits_from(&our_supported_features) {
7993
7993
return Err(ChannelError::close("Channel Type contains unsupported features".to_owned()));
7994
7994
}
7995
- let announced_channel = if (common_fields.channel_flags & 1) == 1 { true } else { false };
7996
- if channel_type.requires_scid_privacy() && announced_channel {
7995
+ let announce_for_forwarding = if (common_fields.channel_flags & 1) == 1 { true } else { false };
7996
+ if channel_type.requires_scid_privacy() && announce_for_forwarding {
7997
7997
return Err(ChannelError::close("SCID Alias/Privacy Channel Type cannot be set on a public channel".to_owned()));
7998
7998
}
7999
7999
Ok(channel_type.clone())
@@ -8366,7 +8366,7 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
8366
8366
delayed_payment_basepoint: keys.delayed_payment_basepoint.to_public_key(),
8367
8367
htlc_basepoint: keys.htlc_basepoint.to_public_key(),
8368
8368
first_per_commitment_point,
8369
- channel_flags: if self.context.config.announced_channel {1} else {0},
8369
+ channel_flags: if self.context.config.announce_for_forwarding {1} else {0},
8370
8370
shutdown_scriptpubkey: Some(match &self.context.shutdown_scriptpubkey {
8371
8371
Some(script) => script.clone().into_inner(),
8372
8372
None => Builder::new().into_script(),
@@ -8545,7 +8545,7 @@ fn get_initial_channel_type(config: &UserConfig, their_features: &InitFeatures)
8545
8545
// available. If it's private, we first try `scid_privacy` as it provides better privacy
8546
8546
// with no other changes, and fall back to `only_static_remotekey`.
8547
8547
let mut ret = ChannelTypeFeatures::only_static_remote_key();
8548
- if !config.channel_handshake_config.announced_channel &&
8548
+ if !config.channel_handshake_config.announce_for_forwarding &&
8549
8549
config.channel_handshake_config.negotiate_scid_privacy &&
8550
8550
their_features.supports_scid_privacy() {
8551
8551
ret.set_scid_privacy_required();
@@ -9017,7 +9017,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
9017
9017
// Read the old serialization of the ChannelConfig from version 0.0.98.
9018
9018
config.as_mut().unwrap().options.forwarding_fee_proportional_millionths = Readable::read(reader)?;
9019
9019
config.as_mut().unwrap().options.cltv_expiry_delta = Readable::read(reader)?;
9020
- config.as_mut().unwrap().announced_channel = Readable::read(reader)?;
9020
+ config.as_mut().unwrap().announce_for_forwarding = Readable::read(reader)?;
9021
9021
config.as_mut().unwrap().commit_upfront_shutdown_pubkey = Readable::read(reader)?;
9022
9022
} else {
9023
9023
// Read the 8 bytes of backwards-compatibility ChannelConfig data.
@@ -10338,7 +10338,7 @@ mod tests {
10338
10338
10339
10339
let counterparty_node_id = PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&[42; 32]).unwrap());
10340
10340
let mut config = UserConfig::default();
10341
- config.channel_handshake_config.announced_channel = false;
10341
+ config.channel_handshake_config.announce_for_forwarding = false;
10342
10342
let mut chan = OutboundV1Channel::<&Keys>::new(&LowerBoundedFeeEstimator::new(&feeest), &&keys_provider, &&keys_provider, counterparty_node_id, &channelmanager::provided_init_features(&config), 10_000_000, 0, 42, &config, 0, 42, None, &*logger).unwrap(); // Nothing uses their network key in this test
10343
10343
chan.context.holder_dust_limit_satoshis = 546;
10344
10344
chan.context.counterparty_selected_channel_reserve_satoshis = Some(0); // Filled in in accept_channel
0 commit comments