Skip to content
Commit 6be21e03 authored by NingLin-P's avatar NingLin-P Committed by GitHub
Browse files

statedb: allow longer state pruning history (#11980)



* introduce DbBackedQueue for the state pruning window

Signed-off-by: default avatarlinning <[email protected]>

* avoid cloning for next_hash

Signed-off-by: default avatarlinning <[email protected]>

* add tests

Signed-off-by: default avatarlinning <[email protected]>

* make clippy happy

Signed-off-by: default avatarlinning <[email protected]>

* impl have_block by checking block number

Signed-off-by: default avatarlinning <[email protected]>

* refactor

Signed-off-by: default avatarlinning <[email protected]>

* fix tests & add test for init db-backed queue

Signed-off-by: default avatarlinning <[email protected]>

* update comment

Signed-off-by: default avatarlinning <[email protected]>

* add check for have_state_at

Signed-off-by: default avatarlinning <[email protected]>

* address comment

Signed-off-by: default avatarlinning <[email protected]>

* renanme unload_blocks to uncached_blocks

Signed-off-by: default avatarlinning <[email protected]>

* address comment

Signed-off-by: default avatarlinning <[email protected]>

* fix syncs_state test

Signed-off-by: default avatarlinning <[email protected]>

* address comment

Signed-off-by: default avatarlinning <[email protected]>

* revert change to make_test_db to add test cases

Signed-off-by: default avatarlinning <[email protected]>

* do not prune unavailable block & add tests

Signed-off-by: default avatarlinning <[email protected]>

* Update client/state-db/src/lib.rs

Signed-off-by: default avatarlinning <[email protected]>

Co-authored-by: default avatarcheme <[email protected]>

* Update client/state-db/src/pruning.rs

Signed-off-by: default avatarlinning <[email protected]>

Co-authored-by: default avatarcheme <[email protected]>

* address comment

Signed-off-by: default avatarlinning <[email protected]>

Signed-off-by: default avatarlinning <[email protected]>
Co-authored-by: default avatarcheme <[email protected]>
parent 3e63e70b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment