From d06b9dfd56fcb4264b3cdc434f2761aa64530819 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Fri, 12 Jan 2024 14:28:10 -0500 Subject: [PATCH] Debug --- .github/workflows/ci.yml | 2 +- src/wallet/wallet.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8262b9f90f65e..8b3309df9d631a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -288,4 +288,4 @@ jobs: - name: Run functional tests env: TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }} - run: py -3 test\functional\test_runner.py --jobs $env:NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix=$env:RUNNER_TEMP --combinedlogslen=99999999 --timeout-factor=$env:TEST_RUNNER_TIMEOUT_FACTOR $env:TEST_RUNNER_EXTRA + run: py -3 test\functional\test_runner.py --jobs $env:NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix=$env:RUNNER_TEMP --combinedlogslen=99999999 --timeout-factor=$env:TEST_RUNNER_TIMEOUT_FACTOR $env:TEST_RUNNER_EXTRA "wallet_assumeutxo.py --descriptors" diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index bf8cfcb082aa9f..ae322464cf5dce 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -507,7 +507,11 @@ std::shared_ptr RestoreWallet(WalletContext& context, const fs::path& b error += strprintf(Untranslated("Unexpected exception: %s"), e.what()); } if (!wallet) { - fs::remove_all(wallet_path); + std::error_code ec; + fs::remove_all(wallet_path, ec); + if (ec) { + LogError("Failed to remove restored wallet: %d, %s", ec.value(), ec.message()); + } } return wallet; @@ -3099,6 +3103,7 @@ std::shared_ptr CWallet::Create(WalletContext& context, const std::stri if (time_first_key) walletInstance->MaybeUpdateBirthTime(*time_first_key); if (chain && !AttachChain(walletInstance, *chain, rescan_required, error, warnings)) { + walletInstance->WalletLogPrintf("Failed to attach chain: %s\n", error.original); return nullptr; }