> init: add utxo snapshot detection
>
> Add functionality for activating a snapshot-based chainstate if one is
> detected on-disk.
>
> Also cautiously initialize chainstate cache usages so that we don't
> somehow blow past our cache allowances during initialization, then
> rebalance at the end of init.
>
> Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
https://github.com/bitcoin/bitcoin/pull/25667/commits/252abd1e8bc5cdf4368ad55e827a873240535b28
> blockmanager: avoid undefined behavior during FlushBlockFile
>
> If we call FlushBlockFile() without having intitialized the block index
> with LoadBlockIndexDB(), we may be indexing into an empty vector.
>
> Specifically this is an issue when we call MaybeRebalanceCaches() during
> chainstate init before the block index has been loaded, which calls
> FlushBlockFile().
>
> Also add an assert to avoid undefined behavior.
>
> Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
https://github.com/bitcoin/bitcoin/pull/25667/commits/8153bd9247dad3982d54488bcdb3960470315290
> 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
Depends on D14650