This PR does not change behavior when bitcoin is built normally with both the SQLite and BDB libraries. It just makes non-SQLite and non-BDB builds more similar to the normal build. Specifically:
-
It makes wallet directory lists always include all wallets so wallets don’t appear missing depending on the build.
-
It now triggers specific “Build does not support SQLite database format” and “Build does not support Berkeley DB database format” errors if a wallet can’t be loaded instead of the more ambiguous and scary “Data is not in recognized format” error.
Both changes are implemented in the last commit. The previous commits are just refactoring cleanups that make the last commit possible and consolidate and reduce code.