mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 14:24:44 +00:00
Add LRU cache to database (#837)
* Add LRU caches to store * Improvements to LRU caches * Take state by value in `Store::put_state` * Store blocks by value, configurable cache sizes * Use a StateBatch to efficiently store skip states * Fix store tests * Add CloneConfig test, remove unused metrics * Use Mutexes instead of RwLocks for LRU caches
This commit is contained in:
@@ -883,7 +883,7 @@ mod test {
|
||||
&state
|
||||
.get_state_root(prev_state.slot)
|
||||
.expect("should find state root"),
|
||||
&prev_state,
|
||||
prev_state,
|
||||
)
|
||||
.expect("should store state");
|
||||
|
||||
@@ -953,7 +953,7 @@ mod test {
|
||||
&state
|
||||
.get_state_root(Slot::new(0))
|
||||
.expect("should find state root"),
|
||||
&prev_state,
|
||||
prev_state,
|
||||
)
|
||||
.expect("should store state");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user