test: Remove unnecessary mining from importdescriptors test #25476

pull fjahr wants to merge 1 commits into bitcoin:master from fjahr:2022-06-importdesctest changing 1 files +1 −1
  1. fjahr commented at 3:02 PM on June 26, 2022: member

    This removes generation of 6 blocks and replaces is with a sync_all in the importdescriptors test.

    The generated blocks themself don't seem to serve any purpose in the test. Instead they could make the test flaky (although I did not find open issues pointing to this happening in practice in the CI). Right before the blocks being generated a transaction is created (L454) and later in the test this tx is assumed to be still in the mempool. If the nodes were to sync their mempools before the blocks are generated, the test fails. It currently only seems to work because one node sends the tx while the other generates the blocks and the mempools are not synced fast enough.

    The sync_all is still needed to let nodes catch up at that point. Otherwise races happen further below which the generate call seems to have prevented so far.

  2. test: Remove unnecessary block mining from importdescriptors test e3d8d72703
  3. fanquake added the label Tests on Jun 26, 2022
  4. fjahr renamed this:
    test: Remove unnecessary block mining from importdescriptors test
    test: Remove unnecessary mining from importdescriptors test
    on Jun 26, 2022
  5. fjahr commented at 5:53 PM on June 26, 2022: member

    Credit to @w0xlt for noticing something was off there

  6. laanwj commented at 8:25 PM on June 26, 2022: member

    Code review ACK e3d8d727031c93a68ef2e5e85c83f4718e4c209f

    If the nodes were to sync their mempools before the blocks are generated, the test fails.

    I think the PR title undersells it. The mining is not only unnecessary, but can actively cause failures.

  7. MarcoFalke merged this on Jun 27, 2022
  8. MarcoFalke closed this on Jun 27, 2022

  9. sidhujag referenced this in commit 668e9835a3 on Jun 27, 2022
  10. DrahtBot locked this on Jun 27, 2023
Contributors
Labels

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-04-13 15:13 UTC

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