Rename handle_degrade_event into handle_fingerprint_change

This commit is contained in:
Alexander Krotov
2020-08-13 22:56:40 +03:00
committed by holger krekel
parent 2feecbc9ff
commit 9810e5562a
3 changed files with 4 additions and 4 deletions

View File

@@ -165,7 +165,7 @@ pub async fn try_decrypt(
peerstate = Peerstate::from_addr(&context, &from).await?;
}
if let Some(peerstate) = peerstate {
peerstate.handle_degrade_event(context).await?;
peerstate.handle_fingerprint_change(context).await?;
if let Some(key) = peerstate.gossip_key {
public_keyring_for_validate.add(key);
}

View File

@@ -1046,7 +1046,7 @@ async fn update_gossip_peerstates(
peerstate = Some(p);
}
if let Some(peerstate) = peerstate {
peerstate.handle_degrade_event(context).await?;
peerstate.handle_fingerprint_change(context).await?;
}
gossipped_addr.insert(header.addr.clone());

View File

@@ -255,7 +255,7 @@ impl<'a> Peerstate<'a> {
}
/// Adds a warning to the chat corresponding to peerstate if fingerprint has changed.
pub(crate) async fn handle_degrade_event(&self, context: &Context) -> Result<()> {
pub(crate) async fn handle_fingerprint_change(&self, context: &Context) -> Result<()> {
if self.fingerprint_changed {
if let Some(contact_id) = context
.sql
@@ -554,7 +554,7 @@ mod tests {
verified_key: None,
verified_key_fingerprint: None,
to_save: Some(ToSave::All),
fingerint_changed: false,
fingerprint_changed: false,
};
assert!(