Skip to content

Commit b1d2c77

Browse files
committed
wallet: Check for descriptors flag before migration
Previously we would check that there is no LegacySPKM in order to determine whether a wallet is already a descriptor wallet and doesn't need to be migrated. However blank legacy wallets will also not have a LegacySPKM, so we need to be checking for the descriptors flag instead.
1 parent 8c127ff commit b1d2c77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4213,7 +4213,7 @@ util::Result<MigrationResult> MigrateLegacyToDescriptor(const std::string& walle
42134213
}
42144214

42154215
// Before anything else, check if there is something to migrate.
4216-
if (!local_wallet->GetLegacyScriptPubKeyMan()) {
4216+
if (local_wallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) {
42174217
return util::Error{_("Error: This wallet is already a descriptor wallet")};
42184218
}
42194219

0 commit comments

Comments
 (0)