Skip to content

Commit f423a15

Browse files
committed
fixed refactor bugs in test
1 parent ac0ccf2 commit f423a15

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
@@ -2545,7 +2545,7 @@ impl Channel {
25452545
/// Note that the "channel must be funded" requirement is stricter than BOLT 7 requires - see
25462546
/// https://github.com/lightningnetwork/lightning-rfc/issues/468
25472547
pub fn get_channel_announcement(&self, our_node_id: PublicKey, chain_hash: Sha256dHash) -> Result<(msgs::UnsignedChannelAnnouncement, Signature), HandleError> {
2548-
if !self.config.channel_options.force_announced_channel_preference {
2548+
if !self.config.channel_options.announced_channel {
25492549
return Err(HandleError{err: "Channel is not available for public announcements", action: Some(msgs::ErrorAction::IgnoreError)});
25502550
}
25512551
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
@@ -3011,7 +3011,7 @@ mod tests {
30113011
let mut config = UserConfigurations::new();
30123012
config.channel_options.announced_channel = true;
30133013
config.channel_options.fee_proportional_millionths = 0;
3014-
config.channel_options.force_announced_channel_preference = true;
3014+
config.channel_options.force_announced_channel_preference = false;
30153015
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();
30163016
let router = Router::new(PublicKey::from_secret_key(&secp_ctx, &node_id), chain_monitor.clone(), Arc::clone(&logger));
30173017
nodes.push(Node { chain_monitor, tx_broadcaster, chan_monitor, node, router,

0 commit comments

Comments
 (0)