diff options
| author | bitflash <dev@bitflash.network> | 2026-08-18 16:26:34 -0300 |
|---|---|---|
| committer | bitflash <dev@bitflash.network> | 2026-08-18 16:26:34 -0300 |
| commit | 477d57b9a01102b6f79ad9b10b2dcfd280faa1cb (patch) | |
| tree | c320e5c1f6e486affdf255a1a4ac806a01b9da7c /src/makefile.mingw | |
| parent | 3f94ec0649f935d00de49ad7b55026317dc64a27 (diff) | |
gui: offer to convert a Berkeley DB wallet to SQLite on first run
A first-run dialog for an existing wallet.dat with no backend choice yet:
"Convert to SQLite" exports the wallet and records the sqlite marker so
the next start opens it; "Keep Berkeley DB" records that choice so the
offer does not return; "Decide later" leaves no marker and asks again.
wallet.dat is never touched, and the change takes effect on restart --
matching the restart-to-apply model.
The conversion itself is DoConvertWalletToSQLite(), a headless-testable
function the button calls: it reuses the export path (extracted as
ExportActiveWalletToSQLite, shared with -walletsqliteexport, which keeps
its own specific messages), refuses if already on SQLite or if a
wallet.sqlite exists, and writes the marker only after a verified export.
New wallet-convert self-test proves the action end to end: build a
Berkeley DB wallet, convert, and confirm wallet.sqlite + the marker are
written, wallet.dat is left untouched, a second convert refuses, and a
flagless restart opens the converted SQLite wallet with its phrase intact.
All wallet suites pass. The modal itself is thin UI over this tested
action.
Diffstat (limited to 'src/makefile.mingw')
| -rw-r--r-- | src/makefile.mingw | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/makefile.mingw b/src/makefile.mingw index 06c9211..55f186b 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw | |||
| @@ -114,6 +114,7 @@ tests: test_bip32.exe bitflash.exe | |||
| 114 | ./bitflash.exe -selftest=wallet-encrypt | 114 | ./bitflash.exe -selftest=wallet-encrypt |
| 115 | ./bitflash.exe -selftest=wallet-sqlite-encrypt | 115 | ./bitflash.exe -selftest=wallet-sqlite-encrypt |
| 116 | ./bitflash.exe -selftest=wallet-backend-default | 116 | ./bitflash.exe -selftest=wallet-backend-default |
| 117 | ./bitflash.exe -selftest=wallet-convert | ||
| 117 | ./bitflash.exe -selftest=net-message | 118 | ./bitflash.exe -selftest=net-message |
| 118 | ./bitflash.exe -selftest=consensus-limits | 119 | ./bitflash.exe -selftest=consensus-limits |
| 119 | ./bitflash.exe -selftest=pool-stratum | 120 | ./bitflash.exe -selftest=pool-stratum |