Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
achow101 committed Jan 12, 2024
1 parent cb57ea6 commit ad737a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
12 changes: 11 additions & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,16 @@ std::shared_ptr<CWallet> RestoreWallet(WalletContext& context, const fs::path& b
error += strprintf(Untranslated("Unexpected exception: %s"), e.what());
}
if (!wallet) {
fs::remove_all(wallet_path);
for (int i = 0; i < 10; ++i) {
std::error_code ec;
fs::remove_all(wallet_path, ec);
if (ec) {
LogError("Failed to remove restored wallet: %d, %s", ec.value(), ec.message());
UninterruptibleSleep(std::chrono::milliseconds{100});
} else {
break;
}
}
}

return wallet;
Expand Down Expand Up @@ -3099,6 +3108,7 @@ std::shared_ptr<CWallet> 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;
}

Expand Down

0 comments on commit ad737a6

Please sign in to comment.