ci, iwyu: Fix warnings in `src/common` and treat them as errors #34995

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:260403-iwyu-common changing 23 files +81 −40
  1. hebasto commented at 11:52 AM on April 3, 2026: member

    This PR continues the ongoing effort to enforce IWYU warnings.

    See Developer Notes.

  2. hebasto added the label Refactoring on Apr 3, 2026
  3. DrahtBot commented at 11:52 AM on April 3, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Approach ACK BrandonOdiwuor

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35043 (refactor: Properly return from ThreadSafeQuestion signal + btcsignals follow-ups by maflcko)
    • #35011 (ci, iwyu: Fix warnings in src/script and treat them as errors by BrandonOdiwuor)
    • #34806 (refactor: logging: Various API improvements by ajtowns)
    • #34617 (fees: wallet: remove block policy fee estimator internals from wallet by ismaelsadeeq)
    • #34075 (fees: Introduce Mempool Based Fee Estimation to reduce overestimation by ismaelsadeeq)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. hebasto marked this as a draft on Apr 3, 2026
  5. DrahtBot added the label CI failed on Apr 3, 2026
  6. DrahtBot commented at 12:27 PM on April 3, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task 32 bit ARM: https://github.com/bitcoin/bitcoin/actions/runs/23945242931/job/69839917221</sub> <sub>LLM reason (✨ experimental): CI failed because compilation of bitcoin-wallet.cpp errored with fatal error: univalue.h: No such file or directory (missing univalue header/dependency).</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  7. fanquake commented at 12:27 PM on April 3, 2026: member

    Seems like IWYU is passing but compilation is failing?

  8. in src/common/config.cpp:5 in b3288c117c outdated
       1 | @@ -2,28 +2,25 @@
       2 |  // Distributed under the MIT software license, see the accompanying
       3 |  // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4 |  
       5 | -#include <common/args.h>
       6 | +#include <common/args.h> // IWYU pragma: associated
    


    fanquake commented at 12:29 PM on April 3, 2026:

    Looks like this is the first usage of this pragma in our code. Reasoning/usage should be documented in the developer notes alongside pragma: export?


    purpleKarrot commented at 9:04 AM on April 28, 2026:

    Right. I think the guidelines could be generalized to "Use IWYU pragma: sparingly". There are cases where annotations are self-explanatory, so "A comment explaining the rationale is required" might be weakened to "... is recommended".


  9. in src/common/netif.cpp:14 in b3288c117c outdated
       5 | @@ -6,13 +6,25 @@
       6 |  
       7 |  #include <common/netif.h>
       8 |  
       9 | +#include <compat/compat.h>
      10 |  #include <logging.h>
      11 |  #include <netbase.h>
      12 |  #include <util/check.h>
      13 |  #include <util/sock.h>
      14 | +#if defined(__APPLE__)
    


    fanquake commented at 12:30 PM on April 3, 2026:

    Unrelated to IWYU?

  10. in src/common/netif.cpp:47 in b3288c117c outdated
      41 | @@ -30,12 +42,13 @@
      42 |  #endif
      43 |  
      44 |  #ifdef HAVE_IFADDRS
      45 | -#include <sys/types.h>
      46 | +// IWYU suggests removing `sys/types.h` because modern systems
      47 | +// treat `ifaddrs.h` as self-contained. We retain it per the
      48 | +// getifaddrs manual page to ensure broad cross-platform compatibility.
    


    fanquake commented at 12:33 PM on April 3, 2026:

    What are the "modern systems" here, and the ones that fall into "broad cross-platform compatibility"?


    fanquake commented at 12:34 PM on April 3, 2026:

    This also seems a bit like an IWYU bug, if it's trying to remove headers that the manpage says you should include.

  11. BrandonOdiwuor commented at 11:53 AM on April 4, 2026: contributor

    Approach ACK

    I was able to incorporate most of the iwyu suggestions except the following changes which cause compilation errors on Ubuntu 24.04

    1. bloom.h
    + #include <span>         // for span
    - #include <span.h>  // lines 10-10
    
    1. settings.h
    + #include <univalue.h>  // for UniValue
    - class UniValue;  // lines 15-15
    
    1. args.h
    - #include <compat/compat.h>  // lines 9-9
    

    NB: removing #include <util/syserror.h> from `src/common/netif.cpp as suggested by IWYU causes the macOS based jobs to fail

    /opt/homebrew/bin/ccache /usr/bin/c++ -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -I/Users/runner/work/bitcoin/bitcoin/repo_archive/ci/scratch/build-aarch64-apple-darwin24.6.0/src -I/Users/runner/work/bitcoin/bitcoin/repo_archive/src -I/Users/runner/work/bitcoin/bitcoin/repo_archive/src/univalue/include -I/Users/runner/work/bitcoin/bitcoin/repo_archive/src/secp256k1/include -isystem /opt/homebrew/Cellar/boost/1.90.0_1/include -O2 -g -std=c++20 -arch arm64 -fPIC -fvisibility=hidden -fmacro-prefix-map=/Users/runner/work/bitcoin/bitcoin/repo_archive/src=. -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -mbranch-protection=bti -Wall -Wextra -Wgnu -Wcovered-switch-default -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety -Wloop-analysis -Wredundant-decls -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wdocumentation -Wself-assign -Wundef -Wno-unused-parameter -Werror -MD -MT src/CMakeFiles/bitcoin_common.dir/common/netif.cpp.o -MF src/CMakeFiles/bitcoin_common.dir/common/netif.cpp.o.d -o src/CMakeFiles/bitcoin_common.dir/common/netif.cpp.o -c /Users/runner/work/bitcoin/bitcoin/repo_archive/src/common/netif.cpp 
    /Users/runner/work/bitcoin/bitcoin/repo_archive/src/common/netif.cpp:249:72: error: use of undeclared identifier 'SysErrorString'
      249 |         LogError("Could not get sysctl length of routing table: %s\n", SysErrorString(errno));
          |                                                                        ^
    /Users/runner/work/bitcoin/bitcoin/repo_archive/src/common/netif.cpp:254:70: error: use of undeclared identifier 'SysErrorString'
      254 |         LogError("Could not get sysctl data of routing table: %s\n", SysErrorString(errno));
    

    <details> <summary>Running IWYU job with check ebaled on `src/common` </summary

    
    + run_iwyu compile_commands_iwyu_errors.json
    + mv /home/runner/work/_temp/build/compile_commands_iwyu_errors.json /home/runner/work/_temp/build/compile_commands.json
    + python3 /include-what-you-use/iwyu_tool.py -p /home/runner/work/_temp/build -j4 -- -Xiwyu --cxx17ns -Xiwyu --mapping_file=/home/runner/work/_temp/contrib/devtools/iwyu/bitcoin.core.imp -Xiwyu --max_line_length=160 -Xiwyu '--check_also=*/primitives/*.h'
    + tee /tmp/iwyu_ci.out
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.cpp has correct #includes/fwd-decls)
    
    
    /home/runner/work/_temp/src/common/bloom.h should add these lines:
    #include <cstdint>      // for uint64_t
    #include <span>         // for span
    
    /home/runner/work/_temp/src/common/bloom.h should remove these lines:
    - #include <span.h>  // lines 9-9
    
    The full include-list for /home/runner/work/_temp/src/common/bloom.h:
    #include <serialize.h>  // for READWRITE, SERIALIZE_METHODS
    #include <cstdint>      // for uint64_t
    #include <span>         // for span
    #include <vector>       // for vector
    class COutPoint;  // lines 13-13
    class CTransaction;  // lines 14-14
    ---
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    /home/runner/work/_temp/src/common/bloom.cpp should add these lines:
    #include <compare>                   // for operator<, strong_ordering
    
    /home/runner/work/_temp/src/common/bloom.cpp should remove these lines:
    - #include <cstdlib>  // lines 19-19
    - #include <limits>  // lines 20-20
    
    The full include-list for /home/runner/work/_temp/src/common/bloom.cpp:
    #include <common/bloom.h>
    #include <hash.h>                    // for MurmurHash3
    #include <primitives/transaction.h>  // for COutPoint, CTxOut, CTransaction, CTxIn, Txid
    #include <random.h>                  // for FastRandomContext
    #include <script/script.h>           // for CScript, opcodetype
    #include <script/solver.h>           // for TxoutType, Solver
    #include <span.h>                    // for MakeUCharSpan
    #include <streams.h>                 // for DataStream
    #include <util/fastrange.h>          // for FastRange32
    #include <util/overflow.h>           // for CeilDiv
    #include <algorithm>                 // for min, fill, max
    #include <cmath>                     // for log, ceil, exp, round
    #include <compare>                   // for operator<, strong_ordering
    #include <vector>                    // for vector
    ---
    
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.cpp has correct #includes/fwd-decls)
    
    
    /home/runner/work/_temp/src/common/args.h should add these lines:
    
    /home/runner/work/_temp/src/common/args.h should remove these lines:
    - #include <compat/compat.h>  // lines 9-9
    
    The full include-list for /home/runner/work/_temp/src/common/args.h:
    #include <common/settings.h>  // for SettingsValue, Settings
    #include <sync.h>             // for EXCLUSIVE_LOCKS_REQUIRED, GUARDED_BY, LOCK, Mutex, UniqueLock
    #include <util/chaintype.h>   // for ChainType
    #include <util/fs.h>          // for path
    #include <concepts>           // for integral
    #include <cstdint>            // for int64_t, uint32_t
    #include <iosfwd>             // for istream
    #include <list>               // for list
    #include <map>                // for map
    #include <optional>           // for optional
    #include <set>                // for set
    #include <string>             // for string, basic_string
    #include <variant>            // for variant
    #include <vector>             // for vector
    class ArgsManager;  // lines 25-25
    ---
    
    /home/runner/work/_temp/src/common/args.cpp should add these lines:
    
    /home/runner/work/_temp/src/common/args.cpp should remove these lines:
    - #include <cassert>  // lines 26-26
    - #include <cstdint>  // lines 27-27
    
    The full include-list for /home/runner/work/_temp/src/common/args.cpp:
    #include <common/args.h>
    #include <chainparamsbase.h>    // for BaseParams, CBaseChainParams
    #include <common/settings.h>    // for SettingsValue, Settings, SettingsSpan, GetSetting, FindKey, GetSettingsList, OnlyHasDefaultSectionSetting, ReadSettings
    #include <logging.h>            // for LogPrintFormatInternal, LogWarning, LogInfo
    #include <sync.h>               // for LOCK, UniqueLock, AssertLockHeld, AssertLockHeldInternal
    #include <tinyformat.h>         // for format, strprintf, formatValue, makeFormatList, formatTruncated
    #include <univalue.h>           // for UniValue
    #include <util/chaintype.h>     // for ChainType, ChainTypeToString, ChainTypeFromString
    #include <util/check.h>         // for Assert, inline_assertion_check, assert
    #include <util/fs.h>            // for path, PathToString, PathFromString, absolute, is_directory, AbsPathJoin, create_directories, operator+, operator/
    #include <util/fs_helpers.h>    // for GetDefaultDataDir, RenameOver
    #include <util/strencodings.h>  // for LocaleIndependentAtoi, FormatParagraph
    #include <util/string.h>        // for Join
    #include <algorithm>            // for any_of
    #include <cstdlib>              // for size_t, getenv
    #include <cstring>              // for strlen
    #include <map>                  // for map, operator==
    #include <optional>             // for optional, nullopt, nullopt_t
    #include <stdexcept>            // for runtime_error, logic_error
    #include <string>               // for basic_string, string, allocator, char_traits, operator+, operator<=>, operator==
    #include <utility>              // for pair, get, move
    #include <variant>              // for variant, get, get_if
    ---
    
    
    /home/runner/work/_temp/src/common/config.cpp should add these lines:
    
    /home/runner/work/_temp/src/common/config.cpp should remove these lines:
    - #include <util/chaintype.h>  // lines 12-12
    - #include <filesystem>  // lines 19-19
    - #include <memory>  // lines 25-25
    
    The full include-list for /home/runner/work/_temp/src/common/config.cpp:
    #include <common/args.h>      // for ArgsManager, SectionInfo, KeyInfo, AbsPathForConfigVal, BITCOIN_CONF_FILENAME, CheckDataDirOption, InterpretKey, Interp...
    #include <common/settings.h>  // for SettingsSpan, Settings, FindKey, SettingsValue
    #include <logging.h>          // for LogPrintFormatInternal, LogWarning, LogInfo
    #include <sync.h>             // for LOCK, UniqueLock
    #include <tinyformat.h>       // for format, formatTruncated, formatValue, makeFormatList, strprintf, tfm, vformat
    #include <univalue.h>         // for UniValue
    #include <util/fs.h>          // for path, PathToString, AbsPathJoin, PathFromString, is_directory
    #include <util/string.h>      // for TrimString, TrimStringView
    #include <algorithm>          // for max
    #include <cassert>            // for assert
    #include <cstdlib>            // for size_t
    #include <fstream>            // for basic_ifstream, basic_istream, ifstream, istream, istringstream
    #include <iostream>           // for cerr
    #include <list>               // for list
    #include <map>                // for map
    #include <optional>           // for optional
    #include <sstream>            // for basic_istringstream
    #include <string>             // for basic_string, string, char_traits, operator+, operator==, getline, operator<<, operator<=>
    #include <string_view>        // for string_view
    #include <utility>            // for pair
    #include <vector>             // for vector
    ---
    
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/common/init.h has correct #includes/fwd-decls)
    
    /home/runner/work/_temp/src/common/init.cpp should add these lines:
    
    /home/runner/work/_temp/src/common/init.cpp should remove these lines:
    - #include <algorithm>  // lines 13-13
    
    The full include-list for /home/runner/work/_temp/src/common/init.cpp:
    #include <common/init.h>
    #include <chainparams.h>       // for SelectParams
    #include <common/args.h>       // for ArgsManager, BITCOIN_CONF_FILENAME, AbsPathForConfigVal, CheckDataDirOption
    #include <logging.h>           // for LogPrintFormatInternal, LogInfo, LogWarning
    #include <tinyformat.h>        // for format, makeFormatList, formatTruncated, formatValue, strprintf
    #include <util/fs.h>           // for path, quoted, PathToString, exists, operator/, create_directories, equivalent
    #include <util/translation.h>  // for TranslatedLiteral, _, BilingualFmt, Untranslated, bilingual_str
    #include <exception>           // for exception
    #include <optional>            // for optional
    ---
    
    
    /home/runner/work/_temp/src/common/interfaces.cpp should add these lines:
    #include <functional>                     // for function
    #include <string>                         // for basic_string, string
    
    /home/runner/work/_temp/src/common/interfaces.cpp should remove these lines:
    
    The full include-list for /home/runner/work/_temp/src/common/interfaces.cpp:
    #include <interfaces/echo.h>              // for Echo, MakeEcho
    #include <interfaces/handler.h>           // for Handler, MakeCleanupHandler, MakeSignalHandler
    #include <boost/signals2/connection.hpp>  // for scoped_connection, connection
    #include <functional>                     // for function
    #include <memory>                         // for unique_ptr, make_unique
    #include <string>                         // for basic_string, string
    #include <utility>                        // for move
    ---
    
    
    /home/runner/work/_temp/src/common/messages.h should add these lines:
    #include <utility>      // for pair
    
    /home/runner/work/_temp/src/common/messages.h should remove these lines:
    
    The full include-list for /home/runner/work/_temp/src/common/messages.h:
    #include <string>       // for string
    #include <string_view>  // for string_view
    #include <utility>      // for pair
    enum class FeeEstimateMode;  // lines 19-19
    enum class FeeReason;  // lines 20-20
    namespace common { enum class PSBTError; }  // lines 26-26
    namespace node { enum class TransactionError; }  // lines 22-22
    struct bilingual_str;  // lines 17-17
    ---
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/common/messages.cpp has correct #includes/fwd-decls)
    
    
    /home/runner/work/_temp/src/common/netif.h should add these lines:
    #include <vector>        // for vector
    
    /home/runner/work/_temp/src/common/netif.h should remove these lines:
    
    The full include-list for /home/runner/work/_temp/src/common/netif.h:
    #include <netaddress.h>  // for CNetAddr, Network
    #include <optional>      // for optional
    #include <vector>        // for vector
    ---
    
    /home/runner/work/_temp/src/common/netif.cpp should add these lines:
    #include <compat/compat.h>         // for AF_INET, in6_addr, in_addr, AF_INET6, sa_family_t, socklen_t, AF_NETLINK, IFF_LOOPBACK, IFF_UP, SOCK_DGRAM, sockaddr
    #include <linux/netlink.h>         // for nlmsghdr, nlattr, NLMSG_HDRLEN, NETLINK_ROUTE, NLMSG_DATA, NLMSG_DONE, NLMSG_LENGTH, NLMSG_NEXT, NLMSG_OK, NLM_F_DUMP
    #include <cerrno>                  // for errno, EAGAIN, EINTR
    #include <cstdint>                 // for int64_t
    #include <cstring>                 // for memcpy
    #include <functional>              // for function
    #include <memory>                  // for unique_ptr
    #include <string>                  // for basic_string
    
    /home/runner/work/_temp/src/common/netif.cpp should remove these lines:
    - #include <util/syserror.h>  // lines 13-13
    
    The full include-list for /home/runner/work/_temp/src/common/netif.cpp:
    #include <common/netif.h>
    #include <bitcoin-build-config.h>  // for HAVE_IFADDRS
    #include <compat/compat.h>         // for AF_INET, in6_addr, in_addr, AF_INET6, sa_family_t, socklen_t, AF_NETLINK, IFF_LOOPBACK, IFF_UP, SOCK_DGRAM, sockaddr
    #include <ifaddrs.h>               // for ifaddrs, freeifaddrs, getifaddrs
    #include <linux/netlink.h>         // for nlmsghdr, nlattr, NLMSG_HDRLEN, NETLINK_ROUTE, NLMSG_DATA, NLMSG_DONE, NLMSG_LENGTH, NLMSG_NEXT, NLMSG_OK, NLM_F_DUMP
    #include <linux/rtnetlink.h>       // for rtmsg, RTA_DATA, RTA_PAYLOAD, rtattr_type_t, rtattr, RTA_NEXT, RTA_OK, RTM_GETROUTE, RTM_NEWROUTE, RTM_PAYLOAD
    #include <logging.h>               // for LogPrintFormatInternal, LogError, LogWarning
    #include <netbase.h>               // for CreateSock
    #include <sys/types.h>             // for ssize_t, size_t
    #include <util/check.h>            // for Assume, inline_assertion_check
    #include <util/sock.h>             // for NetworkErrorString, Sock
    #include <cerrno>                  // for errno, EAGAIN, EINTR
    #include <cstdint>                 // for int64_t
    #include <cstring>                 // for memcpy
    #include <functional>              // for function
    #include <memory>                  // for unique_ptr
    #include <string>                  // for basic_string
    #include <type_traits>             // for conditional_t, is_signed_v
    ---
    
    
    (/home/runner/work/_temp/src/common/run_command.h has correct #includes/fwd-decls)
    
    /home/runner/work/_temp/src/common/run_command.cpp should add these lines:
    #include <sstream>                 // for basic_istringstream, istringstream
    #include <stdexcept>               // for runtime_error
    #include <utility>                 // for get
    
    /home/runner/work/_temp/src/common/run_command.cpp should remove these lines:
    
    The full include-list for /home/runner/work/_temp/src/common/run_command.cpp:
    #include <common/run_command.h>
    #include <bitcoin-build-config.h>  // for ENABLE_EXTERNAL_SIGNER
    #include <tinyformat.h>            // for format, formatTruncated, formatValue, makeFormatList, strprintf
    #include <univalue.h>              // for UniValue
    #include <util/string.h>           // for Join
    #include <util/subprocess.h>       // for Popen, IOTYPE, error, input, output
    #include <sstream>                 // for basic_istringstream, istringstream
    #include <stdexcept>               // for runtime_error
    #include <utility>                 // for get
    ---
    
    
    /home/runner/work/_temp/src/common/pcp.h should add these lines:
    #include <array>         // for array
    #include <chrono>        // for milliseconds
    #include <cstddef>       // for size_t
    #include <cstdint>       // for uint32_t, uint8_t, uint16_t
    #include <string>        // for string
    class CThreadInterrupt;
    
    /home/runner/work/_temp/src/common/pcp.h should remove these lines:
    - #include <util/threadinterrupt.h>  // lines 9-9
    
    The full include-list for /home/runner/work/_temp/src/common/pcp.h:
    #include <netaddress.h>  // for CNetAddr (ptr only), CService
    #include <array>         // for array
    #include <chrono>        // for milliseconds
    #include <cstddef>       // for size_t
    #include <cstdint>       // for uint32_t, uint8_t, uint16_t
    #include <string>        // for string
    #include <variant>       // for variant
    class CThreadInterrupt;
    ---
    
    /home/runner/work/_temp/src/common/pcp.cpp should add these lines:
    #include <compat/compat.h>         // for sockaddr_storage, WSAGetLastError, in_addr, socklen_t, in6_addr, sockaddr_in, AF_INET, IPPROTO_UDP, SOCK_DGRAM
    #include <crypto/hex_base.h>       // for HexStr
    #include <tinyformat.h>            // for format, formatValue, formatTruncated, makeFormatList, strprintf
    #include <util/string.h>           // for HasPrefix
    #include <util/time.h>             // for MockableSteadyClock
    #include <algorithm>               // for __equal_fn, equal
    #include <compare>                 // for operator<, strong_ordering
    #include <cstring>                 // for memcpy
    #include <functional>              // for function
    #include <map>                     // for map, operator==
    #include <memory>                  // for unique_ptr
    #include <optional>                // for optional, nullopt, nullopt_t
    #include <span>                    // for span
    #include <utility>                 // for pair
    #include <vector>                  // for vector
    
    /home/runner/work/_temp/src/common/pcp.cpp should remove these lines:
    - #include <common/netif.h>  // lines 8-8
    - #include <random.h>  // lines 13-13
    - #include <span.h>  // lines 14-14
    - #include <util/readwritefile.h>  // lines 16-16
    - #include <util/strencodings.h>  // lines 18-18
    
    The full include-list for /home/runner/work/_temp/src/common/pcp.cpp:
    #include <common/pcp.h>
    #include <compat/compat.h>         // for sockaddr_storage, WSAGetLastError, in_addr, socklen_t, in6_addr, sockaddr_in, AF_INET, IPPROTO_UDP, SOCK_DGRAM
    #include <crypto/common.h>         // for ReadBE16, WriteBE16, ReadBE32, WriteBE32
    #include <crypto/hex_base.h>       // for HexStr
    #include <logging.h>               // for LogPrintFormatInternal, LogFlags, LogWarning, LogDebug
    #include <netaddress.h>            // for CService, CNetAddr, ADDR_IPV6_SIZE, IPV4_IN_IPV6_PREFIX, ADDR_IPV4_SIZE
    #include <netbase.h>               // for CreateSock
    #include <tinyformat.h>            // for format, formatValue, formatTruncated, makeFormatList, strprintf
    #include <util/check.h>            // for inline_assertion_check, Assume
    #include <util/sock.h>             // for NetworkErrorString, Sock
    #include <util/string.h>           // for HasPrefix
    #include <util/threadinterrupt.h>  // for CThreadInterrupt
    #include <util/time.h>             // for MockableSteadyClock
    #include <algorithm>               // for __equal_fn, equal
    #include <atomic>                  // for atomic
    #include <compare>                 // for operator<, strong_ordering
    #include <cstring>                 // for memcpy
    #include <functional>              // for function
    #include <map>                     // for map, operator==
    #include <memory>                  // for unique_ptr
    #include <optional>                // for optional, nullopt, nullopt_t
    #include <span>                    // for span
    #include <utility>                 // for pair
    #include <vector>                  // for vector
    ---
    
    
    /home/runner/work/_temp/src/common/settings.h should add these lines:
    #include <univalue.h>  // for UniValue
    
    /home/runner/work/_temp/src/common/settings.h should remove these lines:
    - class UniValue;  // lines 15-15
    
    The full include-list for /home/runner/work/_temp/src/common/settings.h:
    #include <univalue.h>  // for UniValue
    #include <util/fs.h>   // for path
    #include <cstddef>     // for size_t
    #include <map>         // for map
    #include <string>      // for basic_string, string
    #include <vector>      // for vector
    ---
    
    /home/runner/work/_temp/src/common/settings.cpp should add these lines:
    
    /home/runner/work/_temp/src/common/settings.cpp should remove these lines:
    - #include <algorithm>  // lines 13-13
    
    The full include-list for /home/runner/work/_temp/src/common/settings.cpp:
    #include <common/settings.h>
    #include <bitcoin-build-config.h>  // for CLIENT_NAME
    #include <tinyformat.h>            // for format, formatValue, makeFormatList, strprintf, formatTruncated
    #include <univalue.h>              // for UniValue
    #include <util/fs.h>               // for PathToString, path, exists
    #include <fstream>                 // for basic_ifstream, basic_ofstream, basic_ostream, endl, ifstream, ofstream
    #include <iterator>                // for istreambuf_iterator, operator==
    #include <map>                     // for map
    #include <string>                  // for basic_string, string, char_traits, operator<=>, operator<<
    #include <utility>                 // for pair
    #include <vector>                  // for vector
    ---
    
    
    (/home/runner/work/_temp/src/common/url.h has correct #includes/fwd-decls)
    
    /home/runner/work/_temp/src/common/url.cpp should add these lines:
    #include <cstddef>       // for size_t
    
    /home/runner/work/_temp/src/common/url.cpp should remove these lines:
    
    The full include-list for /home/runner/work/_temp/src/common/url.cpp:
    #include <common/url.h>
    #include <charconv>      // for from_chars_result, from_chars
    #include <cstddef>       // for size_t
    #include <string>        // for basic_string, string
    #include <string_view>   // for string_view
    #include <system_error>  // for errc
    ---
    
    
    (/home/runner/work/_temp/src/common/signmessage.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    /home/runner/work/_temp/src/common/signmessage.cpp should add these lines:
    #include <addresstype.h>        // for PKHash, CTxDestination, IsValidDestination
    #include <span>                 // for span
    
    /home/runner/work/_temp/src/common/signmessage.cpp should remove these lines:
    
    The full include-list for /home/runner/work/_temp/src/common/signmessage.cpp:
    #include <common/signmessage.h>
    #include <addresstype.h>        // for PKHash, CTxDestination, IsValidDestination
    #include <hash.h>               // for HashWriter
    #include <key.h>                // for CKey
    #include <key_io.h>             // for DecodeDestination
    #include <pubkey.h>             // for CPubKey
    #include <uint256.h>            // for uint256
    #include <util/strencodings.h>  // for DecodeBase64, EncodeBase64
    #include <cassert>              // for assert
    #include <optional>             // for optional
    #include <span>                 // for span
    #include <string>               // for basic_string, string
    #include <variant>              // for get_if
    #include <vector>               // for vector
    ---
    
    
    /home/runner/work/_temp/src/common/system.h should add these lines:
    #include <cstddef>                 // for size_t
    
    /home/runner/work/_temp/src/common/system.h should remove these lines:
    - #include <chrono>  // lines 12-12
    - #include <cstdint>  // lines 13-13
    
    The full include-list for /home/runner/work/_temp/src/common/system.h:
    #include <bitcoin-build-config.h>  // for HAVE_SYSTEM
    #include <util/time.h>             // for SteadyClock
    #include <cstddef>                 // for size_t
    #include <optional>                // for optional
    #include <string>                  // for string
    ---
    
    /home/runner/work/_temp/src/common/system.cpp should add these lines:
    #include <sys/types.h>             // for mode_t
    #include <limits>                  // for numeric_limits
    
    /home/runner/work/_temp/src/common/system.cpp should remove these lines:
    
    The full include-list for /home/runner/work/_temp/src/common/system.cpp:
    #include <common/system.h>
    #include <bitcoin-build-config.h>  // for HAVE_MALLOPT_ARENA_MAX, HAVE_SYSTEM
    #include <logging.h>               // for LogPrintFormatInternal, LogWarning
    #include <malloc.h>                // for M_ARENA_MAX, mallopt
    #include <sys/stat.h>              // for umask
    #include <sys/types.h>             // for mode_t
    #include <unistd.h>                // for sysconf, _SC_PAGESIZE, _SC_PHYS_PAGES
    #include <util/string.h>           // for ReplaceAll
    #include <util/time.h>             // for SteadyClock, operator-
    #include <algorithm>               // for min
    #include <cstddef>                 // for size_t
    #include <cstdint>                 // for uint64_t
    #include <cstdlib>                 // for setenv, system
    #include <limits>                  // for numeric_limits
    #include <locale>                  // for locale
    #include <optional>                // for optional, nullopt, nullopt_t
    #include <stdexcept>               // for runtime_error
    #include <string>                  // for allocator, basic_string, char_traits, string, operator+
    #include <thread>                  // for thread
    ---
    
    
    (/home/runner/work/_temp/src/core_io.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/core_io.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/chainparams.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/chainparams.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/index/base.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/index/base.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/index/blockfilterindex.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/index/blockfilterindex.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/index/coinstatsindex.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/index/coinstatsindex.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/index/txindex.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/index/txindex.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/chain.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/chain.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/checks.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/checks.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/cs_main.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/cs_main.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/index/txospenderindex.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/index/txospenderindex.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/context.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/context.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/mempool_removal_reason.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/mempool_removal_reason.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/disconnected_transactions.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/disconnected_transactions.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/coinstats.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/coinstats.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/univalue/include/univalue.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/univalue/lib/univalue.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/signet.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/signet.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/univalue/lib/univalue_read.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/univalue/lib/univalue_get.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/univalue/lib/univalue_write.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/node/utxo_snapshot.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/node/utxo_snapshot.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/univalue/test/unitester.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/univalue/test/object.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/aes.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/aes.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/chacha20.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/chacha20.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/chacha20poly1305.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/chacha20poly1305.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/hkdf_sha256_32.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/hkdf_sha256_32.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/hex_base.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/hex_base.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/hmac_sha512.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/hmac_sha512.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/hmac_sha256.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/hmac_sha256.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/ripemd160.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/ripemd160.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/poly1305.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/poly1305.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/node/blockstorage.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/node/blockstorage.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/sha256_sse4.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/sha1.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/sha1.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/sha512.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/sha512.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/sha3.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/sha3.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/sha256.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/sha256.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/muhash.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/muhash.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/siphash.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/crypto/siphash.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/sha256_sse41.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/sha256_avx2.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/crypto/sha256_x86_shani.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/zmq/zmqabstractnotifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/zmq/zmqabstractnotifier.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/zmq/zmqutil.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/zmq/zmqutil.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/zmq/zmqnotificationinterface.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/zmq/zmqnotificationinterface.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/zmq/zmqpublishnotifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/zmq/zmqpublishnotifier.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/zmq/zmqrpc.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/zmq/zmqrpc.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/checks.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/checks.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/chain.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/chain.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/context.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/context.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/chainparams.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/chainparams.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/cs_main.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/cs_main.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/bitcoinkernel.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/bitcoinkernel.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/mempool_removal_reason.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/mempool_removal_reason.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/disconnected_transactions.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/disconnected_transactions.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/kernel/coinstats.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/kernel/coinstats.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/node/utxo_snapshot.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/node/utxo_snapshot.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/node/blockstorage.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/node/blockstorage.cpp has correct #includes/fwd-decls)
    
    
    (/home/runner/work/_temp/src/signet.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
    
    (/home/runner/work/_temp/src/signet.cpp has correct #includes/fwd-decls)
    
    + python3 /include-what-you-use/fix_includes.py --nosafe_headers
    (skipping /home/runner/work/_temp/src/primitives/transaction.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/primitives/transaction_identifier.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/primitives/transaction.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/primitives/block.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/primitives/block.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/common/init.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/common/messages.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/common/run_command.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/common/url.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/common/signmessage.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/core_io.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/core_io.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/chainparams.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/chainparams.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/base.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/base.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/blockfilterindex.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/blockfilterindex.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/coinstatsindex.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/coinstatsindex.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/txindex.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/txindex.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/chain.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/chain.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/checks.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/checks.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/cs_main.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/cs_main.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/txospenderindex.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/index/txospenderindex.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/context.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/context.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/mempool_removal_reason.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/mempool_removal_reason.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/disconnected_transactions.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/disconnected_transactions.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/coinstats.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/coinstats.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/univalue/include/univalue.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/univalue/lib/univalue.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/signet.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/signet.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/univalue/lib/univalue_read.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/univalue/lib/univalue_get.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/univalue/lib/univalue_write.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/node/utxo_snapshot.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/node/utxo_snapshot.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/univalue/test/unitester.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/univalue/test/object.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/aes.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/aes.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/chacha20.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/chacha20.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/chacha20poly1305.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/chacha20poly1305.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/hkdf_sha256_32.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/hkdf_sha256_32.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/hex_base.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/hex_base.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/hmac_sha512.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/hmac_sha512.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/hmac_sha256.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/hmac_sha256.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/ripemd160.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/ripemd160.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/poly1305.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/poly1305.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/node/blockstorage.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/node/blockstorage.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha256_sse4.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha1.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha1.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha512.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha512.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha3.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha3.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha256.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha256.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/muhash.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/muhash.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/siphash.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/siphash.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha256_sse41.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha256_avx2.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/crypto/sha256_x86_shani.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqabstractnotifier.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqabstractnotifier.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqutil.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqutil.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqnotificationinterface.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqnotificationinterface.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqpublishnotifier.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqpublishnotifier.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqrpc.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/zmq/zmqrpc.cpp: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/bitcoinkernel.h: iwyu reports no contentful changes)
    (skipping /home/runner/work/_temp/src/kernel/bitcoinkernel.cpp: iwyu reports no contentful changes)
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/bloom.h'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/bloom.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/args.h'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/args.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/config.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/init.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/interfaces.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/messages.h'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/netif.h'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/netif.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/run_command.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/pcp.h'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/pcp.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/settings.h'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/settings.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/url.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/signmessage.cpp'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/system.h'
    >>> Fixing #includes in '/home/runner/work/_temp/src/common/system.cpp'
    IWYU edited 19 files on your behalf.
    
    + git diff -U1
    + ./contrib/devtools/clang-format-diff.py -binary=clang-format-22 -p1 -i -v
    Formatting src/common/args.cpp
    Formatting src/common/args.h
    Formatting src/common/bloom.cpp
    Formatting src/common/bloom.h
    Formatting src/common/config.cpp
    Formatting src/common/init.cpp
    Formatting src/common/interfaces.cpp
    Formatting src/common/messages.h
    Formatting src/common/netif.cpp
    Formatting src/common/netif.h
    Formatting src/common/pcp.cpp
    Formatting src/common/pcp.h
    Formatting src/common/run_command.cpp
    Formatting src/common/settings.cpp
    Formatting src/common/settings.h
    Formatting src/common/signmessage.cpp
    Formatting src/common/system.cpp
    Formatting src/common/system.h
    Formatting src/common/url.cpp
    + git --no-pager diff --exit-code
    diff --git a/src/common/args.cpp b/src/common/args.cpp
    index 12e0f26..101b4b7 100644
    --- a/src/common/args.cpp
    +++ b/src/common/args.cpp
    @@ -23,8 +23,6 @@
     #endif
     
     #include <algorithm>
    -#include <cassert>
    -#include <cstdint>
     #include <cstdlib>
     #include <cstring>
     #include <map>
    diff --git a/src/common/args.h b/src/common/args.h
    index de323d3..26ea241 100644
    --- a/src/common/args.h
    +++ b/src/common/args.h
    @@ -6,7 +6,6 @@
     #define BITCOIN_COMMON_ARGS_H
     
     #include <common/settings.h>
    -#include <compat/compat.h>
     #include <sync.h>
     #include <util/chaintype.h>
     #include <util/fs.h>
    diff --git a/src/common/bloom.cpp b/src/common/bloom.cpp
    index 3ee7899..c15c8f7 100644
    --- a/src/common/bloom.cpp
    +++ b/src/common/bloom.cpp
    @@ -16,8 +16,7 @@
     
     #include <algorithm>
     #include <cmath>
    -#include <cstdlib>
    -#include <limits>
    +#include <compare>
     #include <vector>
     
     static constexpr double LN2SQUARED = 0.4804530139182014246671025263266649717305529515945455;
    diff --git a/src/common/bloom.h b/src/common/bloom.h
    index 97007e1..c9ed89f 100644
    --- a/src/common/bloom.h
    +++ b/src/common/bloom.h
    @@ -6,8 +6,9 @@
     #define BITCOIN_COMMON_BLOOM_H
     
     #include <serialize.h>
    -#include <span.h>
     
    +#include <cstdint>
    +#include <span>
     #include <vector>
     
     class COutPoint;
    diff --git a/src/common/config.cpp b/src/common/config.cpp
    index a05c20d..3c88e3a 100644
    --- a/src/common/config.cpp
    +++ b/src/common/config.cpp
    @@ -3,27 +3,23 @@
     // file COPYING or http://www.opensource.org/licenses/mit-license.php.
     
     #include <common/args.h>
    -
     #include <common/settings.h>
     #include <logging.h>
     #include <sync.h>
     #include <tinyformat.h>
     #include <univalue.h>
    -#include <util/chaintype.h>
     #include <util/fs.h>
     #include <util/string.h>
     
     #include <algorithm>
     #include <cassert>
     #include <cstdlib>
    -#include <filesystem>
     #include <fstream>
     #include <iostream>
    -#include <sstream>
     #include <list>
     #include <map>
    -#include <memory>
     #include <optional>
    +#include <sstream>
     #include <string>
     #include <string_view>
     #include <utility>
    diff --git a/src/common/init.cpp b/src/common/init.cpp
    index 7a1d664..e6f49c3 100644
    --- a/src/common/init.cpp
    +++ b/src/common/init.cpp
    @@ -2,15 +2,15 @@
     // Distributed under the MIT software license, see the accompanying
     // file COPYING or http://www.opensource.org/licenses/mit-license.php.
     
    +#include <common/init.h>
    +
     #include <chainparams.h>
     #include <common/args.h>
    -#include <common/init.h>
     #include <logging.h>
     #include <tinyformat.h>
     #include <util/fs.h>
     #include <util/translation.h>
     
    -#include <algorithm>
     #include <exception>
     #include <optional>
     
    diff --git a/src/common/interfaces.cpp b/src/common/interfaces.cpp
    index ffd85e6..be97653 100644
    --- a/src/common/interfaces.cpp
    +++ b/src/common/interfaces.cpp
    @@ -6,7 +6,10 @@
     #include <interfaces/handler.h>
     
     #include <boost/signals2/connection.hpp>
    +
    +#include <functional>
     #include <memory>
    +#include <string>
     #include <utility>
     
     namespace common {
    diff --git a/src/common/messages.h b/src/common/messages.h
    index 60fdaa1..6dc3212 100644
    --- a/src/common/messages.h
    +++ b/src/common/messages.h
    @@ -13,17 +13,19 @@
     
     #include <string>
     #include <string_view>
    +#include <utility>
     
     struct bilingual_str;
    -
     enum class FeeEstimateMode;
     enum class FeeReason;
    +
     namespace node {
     enum class TransactionError;
     } // namespace node
     
     namespace common {
     enum class PSBTError;
    +
     bool FeeModeFromString(std::string_view mode_string, FeeEstimateMode& fee_estimate_mode);
     std::string StringForFeeReason(FeeReason reason);
     std::string FeeModes(const std::string& delimiter);
    diff --git a/src/common/netif.cpp b/src/common/netif.cpp
    index 8c0c4fa..6d6a6e0 100644
    --- a/src/common/netif.cpp
    +++ b/src/common/netif.cpp
    @@ -6,11 +6,12 @@
     
     #include <common/netif.h>
     
    +#include <compat/compat.h>
    +#include <linux/netlink.h>
     #include <logging.h>
     #include <netbase.h>
     #include <util/check.h>
     #include <util/sock.h>
    -#include <util/syserror.h>
     
     #if defined(__linux__)
     #include <linux/rtnetlink.h>
    @@ -34,6 +35,12 @@
     #include <ifaddrs.h>
     #endif
     
    +#include <cerrno>
    + echo '^^^ ⚠️ Failure generated from IWYU'
    + false
    +#include <cstdint>
    +#include <cstring>
    +#include <functional>
    +#include <memory>
    +#include <string>
     #include <type_traits>
     
     namespace {
    diff --git a/src/common/netif.h b/src/common/netif.h
    index 769bcbc..84df00a 100644
    --- a/src/common/netif.h
    +++ b/src/common/netif.h
    @@ -8,6 +8,7 @@
     #include <netaddress.h>
     
     #include <optional>
    +#include <vector>
     
     //! Query the OS for the default gateway for `network`. This only makes sense for NET_IPV4 and NET_IPV6.
     //! Returns std::nullopt if it cannot be found, or there is no support for this OS.
    diff --git a/src/common/pcp.cpp b/src/common/pcp.cpp
    index a640b82..5fcbec4 100644
    --- a/src/common/pcp.cpp
    +++ b/src/common/pcp.cpp
    @@ -4,19 +4,30 @@
     
     #include <common/pcp.h>
     
    -#include <atomic>
    -#include <common/netif.h>
    +#include <compat/compat.h>
     #include <crypto/common.h>
    +#include <crypto/hex_base.h>
     #include <logging.h>
     #include <netaddress.h>
     #include <netbase.h>
    -#include <random.h>
    -#include <span.h>
    +#include <tinyformat.h>
     #include <util/check.h>
    -#include <util/readwritefile.h>
     #include <util/sock.h>
    -#include <util/strencodings.h>
    +#include <util/string.h>
     #include <util/threadinterrupt.h>
    +#include <util/time.h>
    +
    +#include <algorithm>
    +#include <atomic>
    +#include <compare>
    +#include <cstring>
    +#include <functional>
    +#include <map>
    +#include <memory>
    +#include <optional>
    +#include <span>
    +#include <utility>
    +#include <vector>
     
     namespace {
     
    diff --git a/src/common/pcp.h b/src/common/pcp.h
    index 121349b..b703ccd 100644
    --- a/src/common/pcp.h
    +++ b/src/common/pcp.h
    @@ -6,10 +6,16 @@
     #define BITCOIN_COMMON_PCP_H
     
     #include <netaddress.h>
    -#include <util/threadinterrupt.h>
     
    +#include <array>
    +#include <chrono>
    +#include <cstddef>
    +#include <cstdint>
    +#include <string>
     #include <variant>
     
    +class CThreadInterrupt;
    +
     // RFC6886 NAT-PMP and RFC6887 Port Control Protocol (PCP) implementation.
     // NAT-PMP and PCP use network byte order (big-endian).
     
    diff --git a/src/common/run_command.cpp b/src/common/run_command.cpp
    index 86f89e1..026e1ef 100644
    --- a/src/common/run_command.cpp
    +++ b/src/common/run_command.cpp
    @@ -10,6 +10,10 @@
     #include <univalue.h>
     #include <util/string.h>
     
    +#include <sstream>
    +#include <stdexcept>
    +#include <utility>
    +
     #ifdef ENABLE_EXTERNAL_SIGNER
     #include <util/subprocess.h>
     #endif // ENABLE_EXTERNAL_SIGNER
    diff --git a/src/common/settings.cpp b/src/common/settings.cpp
    index e9b9297..d8c627a 100644
    --- a/src/common/settings.cpp
    +++ b/src/common/settings.cpp
    @@ -2,15 +2,14 @@
     // Distributed under the MIT software license, see the accompanying
     // file COPYING or http://www.opensource.org/licenses/mit-license.php.
     
    -#include <common/settings.h>
    -
     #include <bitcoin-build-config.h> // IWYU pragma: keep
     
    +#include <common/settings.h>
    +
     #include <tinyformat.h>
     #include <univalue.h>
     #include <util/fs.h>
     
    -#include <algorithm>
     #include <fstream>
     #include <iterator>
     #include <map>
    diff --git a/src/common/settings.h b/src/common/settings.h
    index bc7b89a..b326df7 100644
    --- a/src/common/settings.h
    +++ b/src/common/settings.h
    @@ -5,6 +5,7 @@
     #ifndef BITCOIN_COMMON_SETTINGS_H
     #define BITCOIN_COMMON_SETTINGS_H
     
    +#include <univalue.h>
     #include <util/fs.h>
     
     #include <cstddef>
    @@ -12,8 +13,6 @@
     #include <string>
     #include <vector>
     
    -class UniValue;
    -
     namespace common {
     
     //! Settings value type (string/integer/boolean/null variant).
    diff --git a/src/common/signmessage.cpp b/src/common/signmessage.cpp
    index 0f9e1f5..cae76ba 100644
    --- a/src/common/signmessage.cpp
    +++ b/src/common/signmessage.cpp
    @@ -4,6 +4,8 @@
     // file COPYING or http://www.opensource.org/licenses/mit-license.php.
     
     #include <common/signmessage.h>
    +
    +#include <addresstype.h>
     #include <hash.h>
     #include <key.h>
     #include <key_io.h>
    @@ -13,6 +15,7 @@
     
     #include <cassert>
     #include <optional>
    +#include <span>
     #include <string>
     #include <variant>
     #include <vector>
    diff --git a/src/common/system.cpp b/src/common/system.cpp
    index 08c0c69..1d5396e 100644
    --- a/src/common/system.cpp
    +++ b/src/common/system.cpp
    @@ -8,14 +8,16 @@
     #include <common/system.h>
     
     #include <logging.h>
    +#include <sys/types.h>
     #include <util/string.h>
     #include <util/time.h>
     
     #ifdef WIN32
    -#include <cassert>
    -#include <codecvt>
     #include <compat/compat.h>
     #include <windows.h>
    +
    +#include <cassert>
    +#include <codecvt>
     #else
     #include <sys/stat.h>
     #include <unistd.h>
    @@ -29,6 +31,7 @@
     #include <cstddef>
     #include <cstdint>
     #include <cstdlib>
    +#include <limits>
     #include <locale>
     #include <optional>
     #include <stdexcept>
    diff --git a/src/common/system.h b/src/common/system.h
    index a3100fe..6fa6bd4 100644
    --- a/src/common/system.h
    +++ b/src/common/system.h
    @@ -7,10 +7,10 @@
     #define BITCOIN_COMMON_SYSTEM_H
     
     #include <bitcoin-build-config.h> // IWYU pragma: keep
    +
     #include <util/time.h>
     
    -#include <chrono>
    -#include <cstdint>
    +#include <cstddef>
     #include <optional>
     #include <string>
     
    diff --git a/src/common/url.cpp b/src/common/url.cpp
    index 30ac26a..adb5220 100644
    --- a/src/common/url.cpp
    +++ b/src/common/url.cpp
    @@ -5,6 +5,7 @@
     #include <common/url.h>
     
     #include <charconv>
    +#include <cstddef>
     #include <string>
     #include <string_view>
     #include <system_error>
    ^^^ ⚠️ Failure generated from IWYU
    
    

    </details>

  12. DrahtBot added the label Needs rebase on Apr 9, 2026
  13. Include `<univalue.h>` instead of forward declaring `UniValue`
    According to the C++ standard, only a few standard library containers
    can use incomplete types as template parameters, and `std::map` is not
    one of them.
    
    Therefore, a forward declaration of `UniValue` is insufficient. This
    commit replaces the forward declaration with `#include <univalue.h>`.
    
    The accompanying build system changes account for header propagation
    across build targets.
    b1c654bb4f
  14. hebasto force-pushed on Apr 24, 2026
  15. DrahtBot removed the label Needs rebase on Apr 24, 2026
  16. ci, iwyu: Fix warnings in `src/common` and treat them as errors 28712dea94
  17. hebasto force-pushed on Apr 27, 2026
  18. DrahtBot removed the label CI failed on Apr 27, 2026
  19. in src/CMakeLists.txt:279 in 28712dea94
     275 | @@ -274,9 +276,10 @@ add_library(bitcoin_node STATIC EXCLUDE_FROM_ALL
     276 |    $<$<NOT:$<TARGET_EXISTS:bitcoin_wallet>>:dummywallet.cpp>
     277 |  )
     278 |  target_link_libraries(bitcoin_node
     279 | +  PUBLIC
    


    fanquake commented at 2:05 PM on April 27, 2026:

    I don't think we want these PUBLIC? (I also don't think IWYU should be driving build system changes)


    purpleKarrot commented at 8:42 AM on April 28, 2026:

    As stated in the commit message, std::map does not allow incomplete types. settings.h therefore requires univalue.h to be included. That is a PUBLIC dependency by definition.

    At the moment, this dependency is not expressed explicitly. The consequence is that all clients that include settings.h also have to include univalue.h and link bitcoin_common. IWYU does not introduce a new dependency, it just makes it explicit that the dependency exists already.

    Expressing the actual architecture explicitly should be seen as a good thing and we can expect to see more of that in the future. FILE_SET will make it explicit which target a header file belongs to, which is also something that is not expressed in the buildsystem at the moment. Chances are, that we realize that the actual architecture does not match our expectations. We should not blame the tools for this.


    ajtowns commented at 12:13 AM on April 29, 2026:

    settings.h therefore requires univalue.h to be included. That is a PUBLIC dependency by definition.

    I don't follow this -- settings.cpp is in bitcoin_common not bitcoin_node, so if the settings to univalue dependency did mean univalue should be publicly exposed, that would only affect bitcoin_common, not bitcoin_node. But just because univalue is used as the internal implementation for settings, and header information needs to be available to everyone using settings, that doesn't mean the implementation logic needs to be a PUBLIC export even for bitcoin_common, as far as I can see.

    If I'm missing something, can you spell out the logic 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-05-01 06:12 UTC

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