Set version to 0.22.7 in src/CMakeLists.txt,- Happy path 1: Start testnet IBD on this version of the node. run the node on an already synced folder and verify that it fails with `ERROR: LoadBlockIndexGuts: Invalid block index database version: 250300`Check that the node accepts to start from a non-existent DB.
This failure is caused by `CBlockTreeDB::Upgrade` not upgrading the version in the database- Happy path 2: After letting the node in the previous test run for a few minutes to ensure there is a block index DB, since it is already larger than 0.22.7stop it, and then `CBlockTreeDB::LoadBlockIndexGuts` failing to load a database with a version number different than the node version.
Restart a new IBD from scratch (`mv ~/.bitcoin/testnet3/ ~/.bitcoin/testnet3_bck`)then bump the version in src/CMakeLists.txt, recompile and restart the node, wait a few minutes to have a few blocks and a block index. Then bumpand check that IBD resumes successfully after the updating of the version numberDB.
- Stop the node, rerun cmakerevert the previous version bumping, recompile and restart the node, restart the node,check that it fails to start. and check that it fails to start and tells you to reindex with the following message:
```This is because even though `CBlockTreeDB::Upgrade` returns `true` after finding a DB with a more recent version than the node, `CBlockTreeDB::LoadBlockIndexGuts` then fails to load a database with a version number different than the node.
2022-04-25T08:52:14Z- Download a binary for an old node version prior to 0.22.8, us it to start a fresh IBD and let it run for a few minutes. Stop the node, compile and run the node for the current commit, and check that it fails to start because the DB version is too old. Restart with option `-reindex`, and check that this works.
The database is too old. The block index cannot be upgraded and reindexing is required.
2022-04-25T08:52:14Z : Error upgrading block index database.
Please restart with -reindex or -reindex-chainstate to recover.
: Error upgrading block index database.
Please restart with -reindex or -reindex-chainstate to recover.
2022-04-25T08:52:14Z Aborted block database rebuild. Exiting.
```