use Arc<[u64]> rather than Arc<HashSet<u64>> for auth_chain_cache value.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-08 09:01:28 -07:00 committed by June
parent 2cc72de80e
commit c42209c0b3
4 changed files with 20 additions and 21 deletions

View file

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