refactor: Add missing include in bitcoinkernel_wrapper.h #33825

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2511-bld-include changing 1 files +1 −0
  1. maflcko commented at 11:33 AM on November 8, 2025: member

    Otherwise, the compilation may fail with:

    /home/admin/actions-runner/_work/_temp/src/kernel/bitcoinkernel_wrapper.h:271:14: error: no type named 'exception_ptr' in namespace 'std'; did you mean 'exception'?
      271 |         std::exception_ptr exception;
          |         ~~~~~^~~~~~~~~~~~~
          |              exception
    /cxx_build/include/c++/v1/__exception/exception.h:72:33: note: 'exception' declared here
       72 | class _LIBCPP_EXPORTED_FROM_ABI exception {
          |                                 ^
    In file included from /home/admin/actions-runner/_work/_temp/src/bitcoin-chainstate.cpp:1:
    /home/admin/actions-runner/_work/_temp/src/kernel/bitcoinkernel_wrapper.h:284:35: error: no member named 'current_exception' in namespace 'std'
      284 |             data.exception = std::current_exception();
          |                                   ^~~~~~~~~~~~~~~~~
    /home/admin/actions-runner/_work/_temp/src/kernel/bitcoinkernel_wrapper.h:290:14: error: no member named 'rethrow_exception' in namespace 'std'
      290 |         std::rethrow_exception(user_data.exception);
          |              ^~~~~~~~~~~~~~~~~
    /home/admin/actions-runner/_work/_temp/src/kernel/bitcoinkernel_wrapper.h:273:65: error: no viable conversion from 'std::nullptr_t' to 'std::exception'
      273 |     UserData user_data = UserData{.bytes = &bytes, .exception = nullptr};
          |                                                                 ^~~~~~~
    /home/admin/actions-runner/_work/_temp/src/kernel/bitcoinkernel_wrapper.h:733:16: note: in instantiation of function template specialization 'btck::write_bytes<btck_Block>' requested here
      733 |         return write_bytes(get(), btck_block_to_bytes);
          |                ^
    /cxx_build/include/c++/v1/__exception/exception.h:75:25: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'const exception &' for 1st argument
       75 |   _LIBCPP_HIDE_FROM_ABI exception(const exception&) _NOEXCEPT            = default;
          |                         ^         ~~~~~~~~~~~~~~~~
    4 errors generated.
    
  2. refactor: Add missing include in bitcoinkernel_wrapper.h fa1e8d8bad
  3. DrahtBot added the label Refactoring on Nov 8, 2025
  4. DrahtBot commented at 11:33 AM on November 8, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33825.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK TheCharlatan, hebasto, yuvicc

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. sedited approved
  6. sedited commented at 12:07 PM on November 8, 2025: contributor

    ACK fa1e8d8bad92f5fba2b086d78581df4c8123b098

  7. hebasto commented at 2:23 PM on November 8, 2025: member

    ACK fa1e8d8bad92f5fba2b086d78581df4c8123b098.

    Here is IWYU's diff based on #33810:

    --- a/src/kernel/bitcoinkernel_wrapper.h
    +++ b/src/kernel/bitcoinkernel_wrapper.h
    @@ -5,12 +5,19 @@
     #ifndef BITCOIN_KERNEL_BITCOINKERNEL_WRAPPER_H
     #define BITCOIN_KERNEL_BITCOINKERNEL_WRAPPER_H
     
    -#include <kernel/bitcoinkernel.h>
    +#include <kernel/bitcoinkernel.h> // IWYU pragma: export
    +// IWYU pragma: no_include "kernel/bitcoinkernel.h"
     
     #include <array>
    +#include <concepts>
    +#include <cstddef>
    +#include <cstdint>
    +#include <exception>
     #include <functional>
    +#include <iterator>
     #include <memory>
     #include <optional>
    +#include <ranges>
     #include <span>
     #include <stdexcept>
     #include <string>
    @@ -19,7 +26,13 @@
     #include <utility>
     #include <vector>
     
    +class TestKernelNotifications;
    +class TestValidationInterface;
    +
     namespace btck {
    +class Block;
    +class BlockSpentOutputs;
    +class ChainView;
     
     enum class LogCategory : btck_LogCategory {
         ALL = btck_LogCategory_ALL,
    
  8. yuvicc commented at 2:34 PM on November 8, 2025: contributor

    ACK fa1e8d8bad92f5fba2b086d78581df4c8123b098

  9. hebasto merged this on Nov 8, 2025
  10. hebasto closed this on Nov 8, 2025

  11. sfgroupltd78-gif commented at 1:28 AM on November 9, 2025: none

    with the pull request files athttps:

  12. bitcoin deleted a comment on Nov 9, 2025
  13. maflcko deleted the branch on Nov 10, 2025
  14. maflcko commented at 1:50 PM on November 10, 2025: member

    Here is IWYU's diff based on #33810:

    I can't find that in the CI output. I don't think iwyu runs on stand-alone headers without a cpp file?

  15. hebasto commented at 2:01 PM on November 10, 2025: member

    Here is IWYU's diff based on #33810:

    I can't find that in the CI output.

    It's here: https://github.com/hebasto/bitcoin/actions/runs/19194191546/job/54872770781:

    <snip>
    2025-11-08T14:21:35.1873049Z (/home/runner/work/_temp/src/kernel/bitcoinkernel_wrapper.h has correct #includes/fwd-decls)
    <snip>
    

    I don't think iwyu runs on stand-alone headers without a cpp file?

    Correct. However, this issue has been addressed as follows:

    #include <kernel/bitcoinkernel_wrapper.h> // IWYU pragma: associated
    
  16. sedited referenced this in commit 94f024ad07 on Nov 11, 2025
  17. yuvicc referenced this in commit f620a2206b on Nov 16, 2025
  18. stringintech referenced this in commit 52fffa1e5d on Nov 24, 2025
  19. stickies-v referenced this in commit 9fa736f8e4 on Jan 22, 2026
  20. Kino1994 referenced this in commit 7ab3f18d9f on Jun 28, 2026
  21. BigcoinBGC referenced this in commit 0e9d045947 on Jun 30, 2026
  22. Kino1994 referenced this in commit 8178062f70 on Aug 19, 2026
  23. bitcoin locked this on Nov 10, 2026

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-11-10 20:51 UTC

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