mirror of
https://github.com/ratspeak/rsLXMF
synced 2026-11-22 23:10:35 +00:00
lxmd: drop full crypto-state save from announce processing
This commit is contained in:
1 parent
6ac04f0311
commit
5ea513bb95
1 file changed
-6
@@ -1561,7 +1561,6 @@ impl LxmdRunner {
|
||||
while let Ok(event) = self.announce_rx.try_recv() {
|
||||
seen.push(event.destination_hash);
|
||||
let dest_hex = hex::encode(event.destination_hash);
|
||||
let mut crypto_dirty = false;
|
||||
tracing::info!(
|
||||
dest = %dest_hex,
|
||||
hops = event.hops,
|
||||
@@ -1623,18 +1622,13 @@ impl LxmdRunner {
|
||||
&& self.known_identities.get(&dest_hex) != Some(&pub_key)
|
||||
{
|
||||
self.known_identities.insert(dest_hex.clone(), pub_key);
|
||||
crypto_dirty = true;
|
||||
tracing::debug!(dest = %dest_hex, "learned identity key from announce");
|
||||
}
|
||||
if let Some(ratchet_key) = event.ratchet {
|
||||
self.received_ratchets
|
||||
.insert(dest_hex.clone(), ReceivedRatchet::new(ratchet_key));
|
||||
crypto_dirty = true;
|
||||
tracing::debug!(dest = %dest_hex, "learned ratchet from announce");
|
||||
}
|
||||
if crypto_dirty {
|
||||
self.save_crypto_state();
|
||||
}
|
||||
}
|
||||
seen
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user