db: add StoragePath to CDBWrapper/CCoinsViewDB
This is used in subsequent commits. It allows us to clean up UTXO
snapshot chainstate after background validation completes.
https://github.com/bitcoin/bitcoin/pull/25667/commits/d14bebf100aaaa25c7558eeed8b5c536da99885
validation: rename snapshot chainstate dir
This changes the snapshot's leveldb chainstate dir name from
chainstate_[blockhash] to chainstate_snapshot. This simplifies
later logic that loads snapshot data, and enforces the limitation
of a single snapshot at any given time.Since we still need to persist the blockhash of the base block, we
write that out to a file (chainstate_snapshot/base_blockhash) for
later use during initialization, so that we can reinitialize the
snapshot chainstate.Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
https://github.com/bitcoin/bitcoin/pull/25667/commits/f9f1735f139b6a1f1c7fea50717ff90dc4ba2bce
test: allow on-disk coins and block tree dbs in tests
Used when testing cleanup of on-disk chainstate data for snapshot
testcases. Also necessary for simulating node restart in .cpp tests.
https://github.com/bitcoin/bitcoin/pull/25667/commits/51fc9241c08a00f1f407f1534853a5cddbbc0a23
Note: TestChain100Setup now inherits TestingSetup instead of RegTestingSetup. This would normally be done in core#22818 which we didn't backport because the whole softfork machiney is not relevant to us.
This is a partial backport of core#25667