status-go/sqlite
Alex Jbanca 3978048afa
feat: Make DB re-encryption fault proof (#3607)
Improve the error management in order to avoid DB corruption in case the process is killed while encrypting the DB.

Changes:
Use sqlcipher_export instead of rekey to change the DB password. The advantage is that sqlcipher_export will operate on a new DB file and we don't need to modify the current account unless the export is successful.
Keeping the rekey requires to create a DB copy before trying to re-encrypt the DB, but the DB copy is risky in case the DB file changes wile the copy is in progress. It could also lead to DB corruption.
2023-06-14 13:12:23 +03:00
..
fields.go feat(wallet) extract json blobs and add custom migration support 2023-06-08 13:54:40 +02:00
fields_test.go feat(wallet) extract json blobs and add custom migration support 2023-06-08 13:54:40 +02:00
migrate.go feat(wallet) extract json blobs and add custom migration support 2023-06-08 13:54:40 +02:00
sqlite.go feat: Make DB re-encryption fault proof (#3607) 2023-06-14 13:12:23 +03:00