statedb: allow longer state pruning history (#11980)
* introduce DbBackedQueue for the state pruning window Signed-off-by: linning <[email protected]> * avoid cloning for next_hash Signed-off-by: linning <[email protected]> * add tests Signed-off-by: linning <[email protected]> * make clippy happy Signed-off-by: linning <[email protected]> * impl have_block by checking block number Signed-off-by: linning <[email protected]> * refactor Signed-off-by: linning <[email protected]> * fix tests & add test for init db-backed queue Signed-off-by: linning <[email protected]> * update comment Signed-off-by: linning <[email protected]> * add check for have_state_at Signed-off-by: linning <[email protected]> * address comment Signed-off-by: linning <[email protected]> * renanme unload_blocks to uncached_blocks Signed-off-by: linning <[email protected]> * address comment Signed-off-by: linning <[email protected]> * fix syncs_state test Signed-off-by: linning <[email protected]> * address comment Signed-off-by: linning <[email protected]> * revert change to make_test_db to add test cases Signed-off-by: linning <[email protected]> * do not prune unavailable block & add tests Signed-off-by: linning <[email protected]> * Update client/state-db/src/lib.rs Signed-off-by: linning <[email protected]> Co-authored-by: cheme <[email protected]> * Update client/state-db/src/pruning.rs Signed-off-by: linning <[email protected]> Co-authored-by: cheme <[email protected]> * address comment Signed-off-by: linning <[email protected]> Signed-off-by: linning <[email protected]> Co-authored-by: cheme <[email protected]>
parent
3e63e70b
Please register or sign in to comment