move auth_chain_cache to service

This commit is contained in:
Charles Hall 2024-09-30 21:29:16 -07:00
parent 47502d1f36
commit 095ee483ac
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
5 changed files with 65 additions and 52 deletions

View file

@ -1,4 +1,4 @@
use std::{collections::HashSet, sync::Arc};
use std::collections::HashSet;
use crate::{service::rooms::short::ShortEventId, Result};
@ -6,10 +6,10 @@ pub(crate) trait Data: Send + Sync {
fn get_cached_eventid_authchain(
&self,
shorteventid: &[ShortEventId],
) -> Result<Option<Arc<HashSet<ShortEventId>>>>;
) -> Result<Option<HashSet<ShortEventId>>>;
fn cache_auth_chain(
&self,
shorteventid: Vec<ShortEventId>,
auth_chain: Arc<HashSet<ShortEventId>>,
shorteventid: &[ShortEventId],
auth_chain: &HashSet<ShortEventId>,
) -> Result<()>;
}