2 suggestions
Optional improvements
[suggestion] · Retry test never successfully loads over a leftover snapshot directory
The test covers a retry that fails its work check, not a successful loadtxoutset over leftover data, which is the behavior the change is intended to support.
Location: test/functional/feature_assumeutxo.py:221 (head).
Details and suggested fix
The incomplete chainstate_snapshot fixture is used only in test_snapshot_with_less_work. That load passes the new wipe, then fails the work check in PopulateAndValidateSnapshot; the error path deletes the directory. As a result, the final assert not snapshot_dir.exists() does not show that the new behavior permits a successful retry. Add the same marker-less directory with an invalid CURRENT on n1 immediately before its successful loadtxoutset call. The existing snapshot checks would then cover a successful retry, and the later assert_disk_cleanup restart would confirm that the new base_blockhash is detected.
[suggestion] · Startup warning omits how to remove a leftover snapshot directory
Operators who do not intend to retry loadtxoutset, or whose retry fails a precheck, are not told they can remove the leftover directory.
Location: src/node/utxo_snapshot.cpp:60 (head).
Details and suggested fix
The previous message had its arguments swapped, so its deletion advice named the missing base_blockhash file instead of the directory. The rewrite fixes the argument order but drops the deletion option. It says a later loadtxoutset will replace the directory, but replacement occurs only if the retry passes the ActivateSnapshot checks and reaches InitCoinsDB. For example, the forked-headers check returns earlier and tells the user to sync without AssumeUtxo. A marker-less directory is not otherwise removed automatically: LoadAssumeutxoChainstate returns nullptr, and -reindex deletes only a snapshot chainstate that was loaded. Operators who do not retry therefore retain the partial UTXO database and see the warning on each startup. Keep both options in the message: explain that a later loadtxoutset will replace the directory, and that the directory can be deleted while the node is stopped if no snapshot load is intended.