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
wallet, refactor: Decouple into HasLegacyRecords()
The new helper will be used to fix a crash in the
wallet migration process (watch-only, non-blank,
private keys disabled, empty wallet - no scripts
or addresses imported).
Co-authored-by: Matias Furszyfer <[email protected]>
pwallet->WalletLogPrintf("Error getting database cursor for '%s' records\n", type);
559
-
return DBErrors::CORRUPT;
560
-
}
561
-
562
-
DatabaseCursor::Status status = cursor->Next(key, value);
563
-
if (status != DatabaseCursor::Status::DONE) {
564
-
pwallet->WalletLogPrintf("Error: Unexpected legacy entry found in descriptor wallet %s. The wallet might have been tampered with or created with malicious intent.\n", pwallet->GetName());
565
-
return DBErrors::UNEXPECTED_LEGACY_ENTRY;
566
-
}
579
+
if (HasLegacyRecords(*pwallet, batch)) {
580
+
pwallet->WalletLogPrintf("Error: Unexpected legacy entry found in descriptor wallet %s. The wallet might have been tampered with or created with malicious intent.\n", pwallet->GetName());
0 commit comments