rpc: Set best header in reconsiderblock #30652

pull fjahr wants to merge 1 commits into bitcoin:master from fjahr:2024-08-activate-best-header changing 2 files +3 −0
  1. fjahr commented at 8:20 PM on August 13, 2024: contributor

    The reconsiderblock RPC resets the blocks flags and then calls ActivateBestChain(). But this doesn't set m_best_header which leaves us in an inconsistent state until something else triggers a change, like connecting a new block. But, until then, getblockchaininfo, for example, reports having less headers than blocks.

    I found this while working on a more extensive tests for #29553.

  2. rpc: Set best header in reconsiderblock ab56f367df
  3. DrahtBot commented at 8:20 PM on August 13, 2024: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

  4. DrahtBot added the label RPC/REST/ZMQ on Aug 13, 2024
  5. fanquake commented at 8:23 PM on August 13, 2024: member

    See also #26245.

  6. mzumsande commented at 8:24 PM on August 13, 2024: contributor

    It's a duplicate of #29913 (but see also my last comment there why the problem is harder than it seems)

  7. fjahr commented at 8:36 PM on August 13, 2024: contributor

    @mzumsande thanks

  8. fjahr closed this on Aug 13, 2024

  9. bitcoin locked this on Aug 13, 2025

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-22 03:13 UTC

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