diff options
| author | bitflash <dev@bitflash.network> | 2026-08-18 16:14:19 -0300 |
|---|---|---|
| committer | bitflash <dev@bitflash.network> | 2026-08-18 16:14:19 -0300 |
| commit | 3f94ec0649f935d00de49ad7b55026317dc64a27 (patch) | |
| tree | e67ff06c8341889cf90cbbc3b835507a90510b64 /src/imgui/imgui.cpp | |
| parent | f3fb7ce6759ac98a7cc39d586fc2824982c74acd (diff) | |
wallet: make SQLite the default backend for new wallets
A fresh install with no wallet.dat now starts on the SQLite backend and
creates wallet.sqlite, instead of a Berkeley DB wallet.dat. The choice is
recorded in a plain-text <datadir>/wallet-backend marker so it survives a
restart without a command-line flag.
Backend resolution when no -walletbackend is given: an existing
wallet.sqlite (or a "sqlite" marker) stays on SQLite; an existing
wallet.dat stays on Berkeley DB -- nothing is converted behind the user;
a fresh datadir starts on SQLite. An explicit -walletbackend=bdb or a
"bdb" marker forces Berkeley DB and overrides the default.
Adds CreateNewSQLiteWallet() (WalletSQLiteRuntimeOpen gains fMustExist so
the create path can make a new file) which mints the first default key
straight into the SQLite store via the same FinishLoadedWallet() call the
Berkeley DB create path uses, then cleans up on failure. Marker read/write
helpers are plain text, hand-editable.
New wallet-backend-default self-test proves the resolution in child
processes (fresh->SQLite+marker, existing wallet.dat->BDB, "bdb"
marker->BDB, explicit flag->wallet.dat). The three wallet.dat-specific
suites now ask for -walletbackend=bdb explicitly, since a flagless fresh
datadir is SQLite now. All wallet suites pass.
Diffstat (limited to 'src/imgui/imgui.cpp')
0 files changed, 0 insertions, 0 deletions