From 8f7f4f95e86fdf022c6e5f58a9e880f38c6e4afc Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Thu, 13 Aug 2020 23:00:46 +0300 Subject: [PATCH] Do not warn about gossip key changes if it is not used --- src/peerstate.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/peerstate.rs b/src/peerstate.rs index 5751a1106..4f9b31589 100644 --- a/src/peerstate.rs +++ b/src/peerstate.rs @@ -241,7 +241,10 @@ impl<'a> Peerstate<'a> { || old_gossip_fingerprint != self.gossip_key_fingerprint { self.to_save = Some(ToSave::All); - if old_gossip_fingerprint.is_some() { + + // Warn about gossip key change only if there is no public key obtained from + // Autocrypt header, which overrides gossip key. + if old_gossip_fingerprint.is_some() && self.public_key_fingerprint.is_none() { self.fingerprint_changed = true; } }