Skip to content

Commit 99b1c24

Browse files
committed
fixed refactor bugs in test
1 parent 1c8acb8 commit 99b1c24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2546,7 +2546,7 @@ impl Channel {
25462546
/// Note that the "channel must be funded" requirement is stricter than BOLT 7 requires - see
25472547
/// https://github.com/lightningnetwork/lightning-rfc/issues/468
25482548
pub fn get_channel_announcement(&self, our_node_id: PublicKey, chain_hash: Sha256dHash) -> Result<(msgs::UnsignedChannelAnnouncement, Signature), HandleError> {
2549-
if !self.config.channel_options.force_announced_channel_preference {
2549+
if !self.config.channel_options.announced_channel {
25502550
return Err(HandleError{err: "Channel is not available for public announcements", action: Some(msgs::ErrorAction::IgnoreError)});
25512551
}
25522552
if self.channel_state & (ChannelState::ChannelFunded as u32) == 0 {

src/ln/channelmanager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3014,7 +3014,7 @@ mod tests {
30143014
let mut config = UserConfigurations::new();
30153015
config.channel_options.announced_channel = true;
30163016
config.channel_options.fee_proportional_millionths = 0;
3017-
config.channel_options.force_announced_channel_preference = true;
3017+
config.channel_options.force_announced_channel_preference = false;
30183018
let node = ChannelManager::new(node_id.clone(), Network::Testnet, feeest.clone(), chan_monitor.clone(), chain_monitor.clone(), tx_broadcaster.clone(), Arc::clone(&logger), config).unwrap();
30193019
let router = Router::new(PublicKey::from_secret_key(&secp_ctx, &node_id), chain_monitor.clone(), Arc::clone(&logger));
30203020
nodes.push(Node { chain_monitor, tx_broadcaster, chan_monitor, node, router,

0 commit comments

Comments
 (0)