self.channel_update_count
}
+ pub fn should_announce(&self) -> bool {
+ self.announce_publicly
+ }
+
/// Gets the fee we'd want to charge for adding an HTLC output to this Channel
pub fn get_our_fee_base_msat(&self, fee_estimator: &FeeEstimator) -> u32 {
// For lack of a better metric, we calculate what it would cost to consolidate the new HTLC
}
fn get_announcement_sigs(&self, chan: &Channel) -> Result<Option<msgs::AnnouncementSignatures>, HandleError> {
- if !chan.is_usable() { return Ok(None) }
+ if !chan.is_usable() || !chan.should_announce() { return Ok(None) }
let (announcement, our_bitcoin_sig) = chan.get_channel_announcement(self.get_our_node_id(), self.genesis_hash.clone())?;
let msghash = Message::from_slice(&Sha256dHash::from_data(&announcement.encode()[..])[..]).unwrap();