mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-12 05:29:57 +02:00
refactor(core): remove prototype contact paths for experimental saved devices
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -60,6 +60,7 @@ impl DeviceRelationshipService {
|
||||
let _guard = peer_lock.lock().await;
|
||||
|
||||
let Some(row) = self.find_row(&peer_endpoint_id).await? else {
|
||||
self.eligibility.remove_for_peer(&peer_endpoint_id).await?;
|
||||
return Ok(ForgetOutcome {
|
||||
had_relationship: false,
|
||||
generation: None,
|
||||
|
||||
@@ -39,7 +39,7 @@ mod lifecycle;
|
||||
#[cfg(test)]
|
||||
pub(crate) use lifecycle::GenerationTombstone;
|
||||
|
||||
use crate::contacts::ContactStore;
|
||||
use crate::blocked_devices::BlockStore;
|
||||
use crypto::{
|
||||
encode_relationship_grant_secret, prove_relationship_grant, secret_from_material,
|
||||
verify_relationship_grant,
|
||||
@@ -171,13 +171,13 @@ impl DeviceRelationshipService {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) fn contacts(&self) -> ContactStore {
|
||||
ContactStore::new(self.pool.clone())
|
||||
pub(super) fn blocked_devices(&self) -> BlockStore {
|
||||
BlockStore::new(self.pool.clone())
|
||||
}
|
||||
|
||||
pub(super) async fn is_blocked(&self, endpoint_id: &str) -> bool {
|
||||
// Fail closed: a store error must not admit blocked traffic.
|
||||
self.contacts()
|
||||
self.blocked_devices()
|
||||
.is_blocked(endpoint_id)
|
||||
.await
|
||||
.unwrap_or(true)
|
||||
|
||||
Reference in New Issue
Block a user