Skip to content

Commit 3460e1b

Browse files
committed
fix unit tests
1 parent ff2acb6 commit 3460e1b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

fuzz/fuzz_targets/channel_target.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,9 @@ pub fn do_test(data: &[u8]) {
222222
decode_msg!(msgs::OpenChannel, 2*32+6*8+4+2*2+6*33+1)
223223
};
224224
let mut chan_config = UserConfigurations::new();
225-
chan_config.channel_options.annouce_channel = false;
226-
let mut chan = match Channel::new_from_req(&fee_est, chan_keys!(), their_pubkey, &open_chan, slice_to_be64(get_slice!(8)), get_slice!(1)[0] == 0, Arc::clone(&logger),&chan_config) {
225+
chan_config.channel_options.allow_annouce_channel = false;
226+
chan_config.channel_options.annouce_channel = get_slice!(1)[0] == 0;
227+
let mut chan = match Channel::new_from_req(&fee_est, chan_keys!(), their_pubkey, &open_chan, slice_to_be64(get_slice!(8)), Arc::clone(&logger),&chan_config) {
227228
Ok(chan) => chan,
228229
Err(_) => return,
229230
};

src/ln/channel.rs

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

0 commit comments

Comments
 (0)