mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 00:31:24 +01:00
Convert giant tuple in state_compressor to struct
This commit is contained in:
parent
8d09a7e490
commit
edfccea30a
4 changed files with 39 additions and 61 deletions
|
|
@ -159,12 +159,12 @@ impl Service {
|
|||
let (statediffnew, statediffremoved) =
|
||||
if let Some(parent_stateinfo) = states_parents.last() {
|
||||
let statediffnew: HashSet<_> = state_ids_compressed
|
||||
.difference(&parent_stateinfo.1)
|
||||
.difference(&parent_stateinfo.full_state)
|
||||
.copied()
|
||||
.collect();
|
||||
|
||||
let statediffremoved: HashSet<_> = parent_stateinfo
|
||||
.1
|
||||
.full_state
|
||||
.difference(&state_ids_compressed)
|
||||
.copied()
|
||||
.collect();
|
||||
|
|
@ -231,7 +231,7 @@ impl Service {
|
|||
let replaces = states_parents
|
||||
.last()
|
||||
.map(|info| {
|
||||
info.1.iter().find(|bytes| {
|
||||
info.full_state.iter().find(|bytes| {
|
||||
bytes.starts_with(&shortstatekey.to_be_bytes())
|
||||
})
|
||||
})
|
||||
|
|
@ -436,7 +436,7 @@ impl Service {
|
|||
.load_shortstatehash_info(shortstatehash)?
|
||||
.pop()
|
||||
.expect("there is always one layer")
|
||||
.1;
|
||||
.full_state;
|
||||
|
||||
Ok(full_state
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue