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/rpc.cpp | |
| 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/rpc.cpp')
0 files changed, 0 insertions, 0 deletions