test: Wait for index sync in wallet_fast_rescan.py #36618

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2610-test-index-wallet-sync changing 18 files +41 −71
  1. maflcko commented at 8:49 AM on October 23, 2026: member

    Fixes #36564 by adding the missing wait on the index sync.

    Diff to reproduce:

    diff --git a/src/util/thread.cpp b/src/util/thread.cpp
    index 5b20e807b4..2e988c9eea 100644
    --- a/src/util/thread.cpp
    +++ b/src/util/thread.cpp
    @@ -8,2 +8,3 @@
     #include <util/log.h>
    +#include <util/time.h>
     #include <util/threadnames.h>
    @@ -17,2 +18,3 @@ void util::TraceThread(std::string_view thread_name, std::function<void()> threa
         util::ThreadRename(std::string{thread_name});
    +    UninterruptibleSleep(999ms);
         try {
    

    On failure, the log will say something like:

     - 2026-10-18T05:06:44.451973Z [http.01] [wallet/scan.cpp:142] [ShouldFetchBlock] [scan] Fast rescan: inspect block 200 [4c063a93914ec0cb1604297f2f601dab9b9342bf073e6b80e1c11efd71714e2e] (WARNING: block filter not found!)
    
  2. test: Wait for index sync in wallet_fast_rescan.py fa8009ba29
  3. DrahtBot added the label Tests on Oct 23, 2026
  4. DrahtBot commented at 8:49 AM on October 23, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. test: refactor: Wait for index sync by default
    The tests already wait for the mempool and blocks after start and after
    mining, so they should wait for indexes as well to avoid intermittent
    test failures.
    
    This refactor does not change any test behavior.
    fa74dc72d9
  6. maflcko commented at 1:11 PM on October 23, 2026: member

    It seems a bit tedious to find and fix all of those issues by hand. Also, the tests will become overly verbose with all the manual syncs.

    The framework should do this by itself, so I pushed that refactor and removed all of the manual syncs in tests.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-25 01:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me