Fixes #26869
Version 5.x BerkeleyDB wallet.dat
files are backward compatible with the version of BDB that Bitcoin uses, but the database transaction log files (eg - database/log.0000000001
) are not.
The legacy (BDB) backwards compatibility test fails intermittently because those log files aren’t always deleted when the wallet gets unloaded. It appears that DB_LOG_AUTO_REMOVE
is the source of the non-determinism since there aren’t guarantees when it’ll run.
Instead, just skip the logs when copying the wallet files to the older nodes. Alternative solutions include 1) restarting node_master
instead of unloading so that the logs are guaranteed to be deleted or 2) manually deleting the logs before copying the tree, but those are slightly less time efficient.