Skip to content

Commit

Permalink
Merge bitcoin#31248: test: Rework wallet_migration.py to use previous…
Browse files Browse the repository at this point in the history
… releases

55347a5 test: Rework migratewallet to use previous release (v28.0) (Ava Chow)
f42ec0f wallet: Check specified wallet exists before migration (Ava Chow)

Pull request description:

  This PR reworks wallet_migration.py to use previous releases to produce legacy wallets for testing so that the test will continue to work once legacy wallets are removed.

  Split from bitcoin#28710

ACKs for top commit:
  maflcko:
    re-ACK 55347a5 🥊
  rkrux:
    re-ACK 55347a5

Tree-SHA512: f90a2f475febc73d29e8ad3cb20d134c368a40a3b5934c3e4aaa77ae704af6314d4dd2e85c261142bd60a201902ac4ba00b8e2443d3cef7c8cc45d23281fa831
  • Loading branch information
ryanofsky committed Dec 5, 2024
2 parents 6d973f8 + 55347a5 commit 2eccb8b
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 166 deletions.
3 changes: 3 additions & 0 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4407,6 +4407,9 @@ util::Result<MigrationResult> MigrateLegacyToDescriptor(const std::string& walle
if (!wallet_path) {
return util::Error{util::ErrorString(wallet_path)};
}
if (!fs::exists(*wallet_path)) {
return util::Error{_("Error: Wallet does not exist")};
}
if (!IsBDBFile(BDBDataFile(*wallet_path))) {
return util::Error{_("Error: This wallet is already a descriptor wallet")};
}
Expand Down
Loading

0 comments on commit 2eccb8b

Please sign in to comment.