Zebra/zebra-state/src
Alfredo Garcia 769d069d0a
feat(state): delete old database directories (#4586)
* delete old database directories

* check if state directory exists

* skip deleting when ephemeral

* split `check_and_delete_old_databases`

* move `check_and_delete_old_databases` to state

* spawn `check_and_delete_old_databases`

* simplity a bit

* fix(state): only delete old database directories inside the cache directory (#4631)

* Add function comments, tweak log

* Simplify version parsing

* Use spawn_blocking to launch the task on a separate thread, do the cleanup last

* Abort the cleanup task when Zebra exits

* Split directory deletion into its own function, handle ownership

* Rename cache_dir to state_dir

* If an outdated state directory is outside the cache directory, don't delete it

* Minimise diffs

* add test

* fix typos

Co-authored-by: teor <teor@riseup.net>

* add `canonicalize` to test regex

* add another match to test

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-21 00:59:51 +00:00
..
service fix(clippy): Resolve some lifetime and reference lints (#4578) 2022-06-14 06:21:07 +00:00
tests feat(state): add transparent address indexes to the non-finalized state (#4022) 2022-04-12 17:21:46 +00:00
arbitrary.rs fix(doc): Fix various doc warnings, part 2 (#4561) 2022-06-14 01:22:16 +00:00
config.rs feat(state): delete old database directories (#4586) 2022-06-21 00:59:51 +00:00
constants.rs 2. fix(state): index spending transaction IDs for each address (#4355) 2022-05-20 02:22:01 +00:00
error.rs Validate sapling, orchard anchors (#3084) 2021-11-30 16:05:35 +00:00
lib.rs feat(state): delete old database directories (#4586) 2022-06-21 00:59:51 +00:00
request.rs fix(doc): Fix various doc warnings, part 1 (#4514) 2022-06-02 15:07:35 +00:00
response.rs fix(doc): Fix various doc warnings, part 2 (#4561) 2022-06-14 01:22:16 +00:00
service.rs fix(doc): Fix various doc warnings, part 2 (#4561) 2022-06-14 01:22:16 +00:00
tests.rs ZIP-221 and ZIP-244 commitment validation in non-finalized state (#2609) 2021-08-17 11:49:27 -03:00
util.rs feat(log): log the state tip height as part of sync progress logs (#3437) 2022-01-28 19:12:19 -03:00