Skip to content

Commit e8812bd

Browse files
committed
Clearer message when migration runs for first time users
1 parent 5090652 commit e8812bd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/db/storage.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,9 @@ namespace db
381381

382382
void migrate_0_1(MDB_txn& txn, tables_ const& tables)
383383
{
384-
MINFO("Migrating from db version 0 to 1...");
385-
386384
// All addresses in version 0 were primary addresses, but didn't have a bool `is_subaddress`.
387385
// This migration adds a falsey `is_subaddress` to every account_address stored in the db.
386+
// If no addresses are stored, this wraps up quickly.
388387
struct account_address_v0
389388
{
390389
crypto::public_key view_public; //!< Must be first for LMDB optimizations.
@@ -544,6 +543,9 @@ namespace db
544543

545544
void migrate(MDB_txn& txn, tables_ const& tables, const unsigned oldversion)
546545
{
546+
if (oldversion == 0)
547+
MINFO("Setting up database...");
548+
547549
if (oldversion < 1)
548550
migrate_0_1(txn, tables);
549551
}

0 commit comments

Comments
 (0)