You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Legacy wallets do not have the descriptors flag set. Don't load wallets
without the descriptors flag.
At the same time, we will no longer load BDB databases since they are
only used for legacy wallets.
error = strprintf(_("Error loading %s: Wallet is a legacy wallet. Please migrate to a descriptor wallet using the migration tool (migratewallet RPC)."), walletFile);
// If BERKELEY was the format, then change the format from BERKELEY to BERKELEY_RO
1421
-
if (format && options.require_format && format == DatabaseFormat::BERKELEY && options.require_format == DatabaseFormat::BERKELEY_RO) {
1422
-
format = DatabaseFormat::BERKELEY_RO;
1425
+
// BERKELEY_RO can only be opened if require_format was set, which only occurs in migration.
1426
+
if (format && format == DatabaseFormat::BERKELEY_RO && (!options.require_format || options.require_format != DatabaseFormat::BERKELEY_RO)) {
1427
+
error = Untranslated(strprintf("Failed to open database path '%s'. The wallet appears to be a Legacy wallet, please use the wallet migration tool (migratewallet RPC).", fs::PathToString(path)));
1428
+
status = DatabaseStatus::FAILED_BAD_FORMAT;
1429
+
returnnullptr;
1423
1430
}
1424
1431
1425
1432
// A db already exists so format is set, but options also specifies the format, so make sure they agree
# Legacy wallets are no longer supported. Trying to load these should result in an error
341
+
assert_raises_rpc_error(-18, "The wallet appears to be a Legacy wallet, please use the wallet migration tool (migratewallet RPC)", node_master.restorewallet, wallet_name, backup_path)
0 commit comments