mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Persistent committee caches and exit cache
This commit is contained in:
@@ -409,15 +409,15 @@ mod test {
|
||||
let mut hashes = (0..).map(Hash256::from_low_u64_be);
|
||||
let roots_a = state_a.block_roots_mut();
|
||||
for i in 0..roots_a.len() {
|
||||
roots_a[i] = hashes.next().unwrap()
|
||||
*roots_a.get_mut(i).unwrap() = hashes.next().unwrap()
|
||||
}
|
||||
let roots_b = state_b.block_roots_mut();
|
||||
for i in 0..roots_b.len() {
|
||||
roots_b[i] = hashes.next().unwrap()
|
||||
*roots_b.get_mut(i).unwrap() = hashes.next().unwrap()
|
||||
}
|
||||
|
||||
let state_a_root = hashes.next().unwrap();
|
||||
state_b.state_roots_mut()[0] = state_a_root;
|
||||
*state_b.state_roots_mut().get_mut(0).unwrap() = state_a_root;
|
||||
store.put_state(&state_a_root, &state_a).unwrap();
|
||||
|
||||
let iter = BlockRootsIterator::new(&store, &state_b);
|
||||
|
||||
Reference in New Issue
Block a user