The change keeps the original wallet database in place while Bitcoin Core creates the SQLite version. After writing the wallet records successfully, the software can move the new database into place, rather than deleting the original before the replacement is ready.
The migration updates follow earlier fixes for unnamed legacy wallets and crashes when Bitcoin Core could not write to a wallet directory. The new handling catches certain wallet-creation mismatches and can restore the original from backup. A migration attempted in a read-only directory now stops with a clear error, and a test checks that the wallet remains in its legacy format. The change also tests wallets stored on a separate filesystem.
Bitcoin Core now halts migration if it finds a leftover SQLite journal in the wallet directory, which could otherwise corrupt the new database. The test verifies the journal remains and the wallet keeps its old format. Automatic recovery still depends on successfully copying the backup back: Ryan Ofsky noted in his review that if that copy fails, the user must restore the backup manually.




