Restore peerstate constants from C core

This commit is contained in:
Alexander Krotov
2019-11-26 17:48:57 +01:00
committed by holger krekel
parent fc1a136448
commit 59700cb477
6 changed files with 48 additions and 17 deletions

View File

@@ -1640,7 +1640,11 @@ fn check_verified_properties(
info!(context, "{} has verified {}.", contact.get_addr(), to_addr,);
let fp = peerstate.gossip_key_fingerprint.clone();
if let Some(fp) = fp {
peerstate.set_verified(0, &fp, 2);
peerstate.set_verified(
DC_PS_GOSSIP_KEY,
&fp,
PeerstateVerifiedStatus::BidirectVerified,
);
peerstate.save_to_db(&context.sql, false)?;
is_verified = true;
}