File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10221,18 +10221,19 @@ where
10221
10221
// `channel_update`s for any channels less than a week old.
10222
10222
let funding_conf_height =
10223
10223
channel.context.get_funding_tx_confirmation_height().unwrap_or(height);
10224
- let mut should_announce = announcement_sigs.is_some() || funding_conf_height < height + 1008;
10225
10224
// To avoid broadcast storms after each block, only
10226
10225
// re-broadcast every hour (6 blocks) after the initial
10227
10226
// broadcast, or if this is the first time we're ready to
10228
10227
// broadcast this channel.
10229
- should_announce &= announcement_sigs.is_some() || funding_conf_height % 6 == height % 6;
10228
+ let rebroadcast_announcement = funding_conf_height < height + 1008
10229
+ && funding_conf_height % 6 == height % 6;
10230
+ let mut should_announce = announcement_sigs.is_some() || rebroadcast_announcement;
10230
10231
// Most of our tests were written when we only broadcasted
10231
10232
// `channel_announcement`s once and then never re-broadcasted
10232
10233
// them again, so disable the re-broadcasting entirely in tests
10233
10234
#[cfg(test)]
10234
10235
{
10235
- should_announce & = announcement_sigs.is_some();
10236
+ should_announce = announcement_sigs.is_some();
10236
10237
}
10237
10238
if should_announce {
10238
10239
if let Some(announcement) = channel.get_signed_channel_announcement(
You can’t perform that action at this time.
0 commit comments