contrib: Fix NameError in signet miner gbt() #35044

pull torkelrogstad wants to merge 1 commits into bitcoin:master from torkelrogstad:2026-04-10-signet changing 1 files +1 −1
  1. torkelrogstad commented at 8:25 am on April 10, 2026: contributor

    The logging.warning call referenced bci["bestblockhash"], a variable from the calling scope do_generate() that is not available inside the Generate.gbt() method. This would crash with a NameError when getblocktemplate returned a template based on an unexpected previous block.

    Use the bestblockhash parameter that was already being passed in and used correctly in the comparison on the line above.

    The bug was introduced in 7b31332370 when the gbt logic was extracted into its own method — the if-condition was updated but the logging call was not.

  2. contrib: Fix NameError in signet miner gbt()
    The logging.warning call referenced `bci["bestblockhash"]`, a variable
    from the calling scope `do_generate()` that is not available inside the
    `Generate.gbt()` method. This would crash with a NameError when
    getblocktemplate returned a template based on an unexpected previous
    block.
    
    Use the `bestblockhash` parameter that was already being passed in and
    used correctly in the comparison on the line above.
    
    The bug was introduced in 7b31332370 when the gbt logic was extracted
    into its own method — the if-condition was updated but the logging
    call was not.
    701bc2dc02
  3. DrahtBot added the label Scripts and tools on Apr 10, 2026
  4. DrahtBot commented at 8:25 am on April 10, 2026: contributor

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

    Reviews

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


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-12 09:13 UTC

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