mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
add constructor for state compressor service
This commit is contained in:
parent
c6e2f8372c
commit
f702b6cccd
2 changed files with 15 additions and 5 deletions
|
|
@ -72,6 +72,16 @@ impl CompressedStateEvent {
|
|||
}
|
||||
|
||||
impl Service {
|
||||
pub(crate) fn new(
|
||||
db: &'static dyn Data,
|
||||
stateinfo_cache_size: usize,
|
||||
) -> Self {
|
||||
Self {
|
||||
db,
|
||||
stateinfo_cache: Mutex::new(LruCache::new(stateinfo_cache_size)),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns a stack with info on shortstatehash, full state, added diff and
|
||||
/// removed diff for the selected shortstatehash and each parent layer.
|
||||
#[allow(clippy::type_complexity)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue