Currently, the only way of forcing Chronik to reindex is to delete the indexes/chronik folder. With this change, Chronik now respects -reindex, and uses RocksDB's DestroyDB function to wipe the DB cleanly.
Details
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABCc6b762a3442f: [Chronik] Wipe Chronik db when `-reindex` is set
ninja && ninja check-crates && ./test/functional/test_runner.py chronik_reindex
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
test/functional/chronik_reindex.py | ||
---|---|---|
25 ↗ | (On Diff #38522) | This is duplicated from chronik_block.py. Not in this diff, but it would be a good move to add a new Chronik python class to the test framework that can handle the requests. |
42 ↗ | (On Diff #38522) | the extra args are not needed if untouched. You can leave it if you remove the params from the defaults |
51 ↗ | (On Diff #38522) | You should merge this test and chronik_resync imo. This will let you factor out some code like this one, and this is mostly the same feature. If you want to keep things clean, you can separate the cases into functions, like: def run_tests(self): test_resync_happy_path() test_resync_corrupted_db() test_node_reindex() test_chronik_reindex() ... |
55 ↗ | (On Diff #38522) | dito |