This PR continues the ongoing effort to enforce IWYU warnings.
See Developer Notes.
src/util and treat them as errors
#34448
This PR continues the ongoing effort to enforce IWYU warnings.
See Developer Notes.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | maflcko, BrandonOdiwuor, achow101 |
If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.
Reviewers, this pull request conflicts with the following ones:
-dbcache with system RAM by l0rinc)_MiB/_GiB consistently for byte conversions by l0rinc)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.
0In file included from /home/admin/actions-runner/_work/_temp/src/hash.h:16:
1/home/admin/actions-runner/_work/_temp/src/uint256.h:150:17: error: no member named 'HexDigit' in the global namespace
2 150 | *p1 = ::HexDigit(str[--digits]);
3 | ^~~~~~~~
4/home/admin/actions-runner/_work/_temp/src/uint256.h:152:38: error: no member named 'HexDigit' in the global namespace
5 152 | *p1 |= ((unsigned char)::HexDigit(str[--digits]) << 4);
6 | ^~~~~~~~
72 errors generated.
🚧 At least one of the CI tasks failed.
Task Valgrind, fuzz: https://github.com/bitcoin/bitcoin/actions/runs/21484505843/job/61889746047
LLM reason (✨ experimental): Compilation failed due to missing #include causing std::vector to be undefined in string.h and related code.
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.
7@@ -8,13 +8,16 @@
8 # libc symbols.
9 { "symbol": ["AT_HWCAP", "private", "<sys/auxv.h>", "public"] },
10 { "symbol": ["AT_HWCAP2", "private", "<sys/auxv.h>", "public"] },
11+ { "symbol": ["sched_param", "private", "<sched.h>", "public"] },
sched_param mentioned in https://github.com/include-what-you-use/include-what-you-use/issues/1809. Are you opening separate issues for different symbols, or just adding new missing symbols to https://github.com/include-what-you-use/include-what-you-use/issues/1809? Any reason to not add the missing mappings upstream; otherwise it seems like we are just accumulating workarounds for things that are not being fixed.
I don’t see
sched_parammentioned in include-what-you-use/include-what-you-use#1809.
An upstream fix has been proposed in https://github.com/include-what-you-use/include-what-you-use/pull/1918.
Any reason to not add the missing mappings upstream; otherwise it seems like we are just accumulating workarounds for things that are not being fixed.
Fixed upstream in https://github.com/include-what-you-use/include-what-you-use/pull/1923.
7@@ -8,13 +8,16 @@
8 # libc symbols.
9 { "symbol": ["AT_HWCAP", "private", "<sys/auxv.h>", "public"] },
10 { "symbol": ["AT_HWCAP2", "private", "<sys/auxv.h>", "public"] },
11+ { "symbol": ["sched_param", "private", "<sched.h>", "public"] },
12
13 # Fixed in https://github.com/include-what-you-use/include-what-you-use/pull/1706.
Fixed in https://github.com/include-what-you-use/include-what-you-use/pull/1706.
This was fixed in IWYU 0.25, which we are using, so this whole block should be able to be dropped?
8 #include <util/syserror.h>
9
10+#include <string>
11+
12 #if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
13-#include <pthread.h>
5@@ -6,8 +6,11 @@
6 #ifndef BITCOIN_UTIL_TIME_H
7 #define BITCOIN_UTIL_TIME_H
8
9+#include <compat/compat.h>
compat.h being added here (with sys/time.h being added to it), rather than just including sys/time.h here? It seems like compat.h is starting to become a catch-all for includes, which is going in the opposite of the direction we want (and defeats the point of IWYU).
Why is
compat.hbeing added here (withsys/time.hbeing added to it), rather than just includingsys/time.hhere?
Without #include <compat/compat.h>, the code has to be:
0#ifdef WIN32
1#include <winsock2.h>
2#else
3#include <sys/time.h>
4#endif
This was actually my first iteration while working on this PR.
It seems like
compat.his starting to become a catch-all for includes, which is going in the opposite of the direction we want (and defeats the point of IWYU).
I agree. It would be great to have clearly documented use cases for compat.h.
Without #include <compat/compat.h>, the code has to be:
What is wrong with that code?
winsock2.h change seems unrelated, given IWYU is not run for Windows.
Also, the
winsock2.hchange seems unrelated, given IWYU is not run for Windows.
We still cross-compile for it and support native Windows builds. The winsock2.h header defines the timeval structure used here: https://github.com/bitcoin/bitcoin/blob/9f8764c814ead48d45b3822dfcc4cc2b3bda80d6/src/util/time.h#L151-L159
The code currently compiles without it only because of transitive includes, which is going in the opposite of the direction we want.
Without #include <compat/compat.h>, the code has to be:
What is wrong with that code?
I think it is missing the IWYU export. Generally, those should be avoided, but when it comes to compat headers, I think there is a benefit to just have them imported once to get one symbol cross-platform and then IWYU export them.
Otherwise, all call-sites will have to add:
0#ifdef WIN32
1#include <winsock2.h>
2#else
3#include <sys/time.h>
4#endif
,which is verbose, and hard to review, and easy to get wrong: As you say iwyu is not run on Windows and the transitive include can hide a missing winsock2 include.
So I think the options are either:
Otherwise, all call-sites will have to add:
Isn’t this the only callsite though? I don’t really see why we’d add #include <sys/time.h> to compat.h, just to have it included hundreds of places it isn’t needed, for the sake of saving 1 #ifdef.
I think before we make any more changes, we need to decide if we are actually doing IWYU, or only when it’s convenient/not inconvenient for Windows, and otherwise bundling things in 1 header to include everywhere else.
Isn’t this the only callsite though?
0$ git grep -l timeval -- src ":(exclude)src/leveldb" ":(exclude)src/secp256k1"
1src/crypto/ctaes/bench.c
2src/httpserver.cpp
3src/httpserver.h
4src/randomenv.cpp
5src/torcontrol.cpp
6src/util/sock.cpp
7src/util/time.cpp
8src/util/time.h
compat.h already includes sys/select.h, which also defines timeval. So why does sys/time.h need to be added to compat.h?
Alternatively, we can introduce a new compat_time.h header, which exports both winsock2.h and sys/time.h, and specify a new mapping in iwyu/bitcoin.core.imp:
0{ "symbol": ["timeval", "private", "<compat_time.h>", "public"] },
Isn’t this the only callsite though?
0$ git grep -l timeval -- src ":(exclude)src/leveldb" ":(exclude)src/secp256k1" 1src/crypto/ctaes/bench.c 2src/httpserver.cpp 3src/httpserver.h 4src/randomenv.cpp 5src/torcontrol.cpp 6src/util/sock.cpp 7src/util/time.cpp 8src/util/time.h
Right, my understanding is that all those would have to add the same
0#ifdef WIN32
1#include <winsock2.h>
2#else
3#include <sys/time.h>
4#endif
Alternatively, we can introduce a new
compat_time.hheader, which exports bothwinsock2.handsys/time.h, and specify a new mapping iniwyu/bitcoin.core.imp:0{ "symbol": ["timeval", "private", "<compat_time.h>", "public"] },
Yeah, that is a bit cleaner than the “iwyu export” hack. Maybe it can be named ./src/compat/time.h though?
compat.h?
compat.h, into many more of these mini-compat headers, and have many new includes (which themselves are some #ifdef logic + includes) in every file that previously only included compat.h? I do wonder if that will make it more or less likely to run into issues like #34454, or if that is really worth it to save some (hopefully comparatively ) small amount of code duplication/preprocessor time.
I’d say it would just be two:
But no strong opinion. Leaving this pull as-is is also fine.
compat.h, because timeval is already defined by sys/select.h.
along with reporting upstream
https://github.com/include-what-you-use/include-what-you-use/pull/1927.
Not sure how heavy the full compat net stack headers are to parse every time util/time.h is included. It may be faster to just include what is needed via compat/time.h instead of compat/compat.h, but I haven’t benchmarked this.
A third alternative could be to just move MillisToTimeval into compat.h
compat.h (or any other facade header) does not guarantee adherence to the ‘include what you use’ paradigm, as the timeval symbol can be defined in any of four different headers. Therefore, the decision of which header to include should be based on the headers already present in the given file.
Not sure how heavy the full compat net stack headers are to parse every time util/time.h is included. It may be faster to just include what is needed via compat/time.h instead of compat/compat.h, but I haven’t benchmarked this.
A third alternative could be to just move
MillisToTimevalinto compat.h
Just benchmarked this and compat.h parsing takes less than 1% of the time.cpp compile time according to -ftime-trace https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-ftime-trace
So I guess it is fine to leave this as-is for now.
unrelated, but the clang-format in the ci container seems broken? It removes the newlines. E.g. https://github.com/bitcoin/bitcoin/actions/runs/21830259022/job/62995439943#step:11:1639
0diff --git a/src/index/base.cpp b/src/index/base.cpp
1index 39d4dc7..0547fd1 100644
2--- a/src/index/base.cpp
3+++ b/src/index/base.cpp
4@@ -10,6 +10,7 @@
5 #include <interfaces/chain.h>
6 #include <interfaces/types.h>
7 #include <kernel/types.h>
8+#include <logging.h>
9 #include <node/abort.h>
10 #include <node/blockstorage.h>
11 #include <node/context.h>
12@@ -21,7 +22,6 @@
13 #include <uint256.h>
14 #include <undo.h>
15 #include <util/fs.h>
16-#include <util/log.h>
17 #include <util/string.h>
18 #include <util/thread.h>
19 #include <util/threadinterrupt.h>
20diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp
21index cf31c9a..a805719 100644
22--- a/src/node/blockstorage.cpp
23+++ b/src/node/blockstorage.cpp
24@@ -3,7 +3,6 @@
25 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
26
27 #include <node/blockstorage.h>
28-
29 #include <arith_uint256.h>
30 #include <chain.h>
31 #include <consensus/params.h>
32@@ -30,7 +29,6 @@
33 #include <util/check.h>
34 #include <util/expected.h>
35 #include <util/fs.h>
36-#include <util/log.h>
37 #include <util/obfuscation.h>
38 #include <util/overflow.h>
39 #include <util/result.h>
40@@ -40,7 +38,6 @@
41 #include <util/time.h>
42 #include <util/translation.h>
43 #include <validation.h>
44-
45 #include <cerrno>
46 #include <compare>
47 #include <cstddef>
unrelated, but the clang-format in the ci container seems broken? It removes the newlines. E.g. https://github.com/bitcoin/bitcoin/actions/runs/21830259022/job/62995439943#step:11:1639
Looks like fix_includes.py strips empty lines and clang-format-diff.py fails to restore them.
unrelated, but the clang-format in the ci container seems broken? It removes the newlines. E.g. https://github.com/bitcoin/bitcoin/actions/runs/21830259022/job/62995439943#step:11:1639
Looks like
fix_includes.pystrips empty lines andclang-format-diff.pyfails to restore them.
Fixed in #34551.
The only conflicting PR has been merged, so now seems like a good time to get this reviewed.
Friendly ping @sedited @maflcko @willcl-ark :)
19 #include <string>
20 #include <string_view>
21 #include <thread>
22
23+#ifdef WIN32
24+#include <winsock2.h>
util/time.h)?
timeval type.
5@@ -6,7 +6,6 @@
6 #define BITCOIN_UTIL_THREADINTERRUPT_H
7
8 #include <sync.h>
9-#include <threadsafety.h>
pragma: export from sync.h, and retain this header, given it is used?
🚧 At least one of the CI tasks failed.
Task Windows-cross to x86_64, ucrt: https://github.com/bitcoin/bitcoin/actions/runs/21989888993/job/63533810608
LLM reason (✨ experimental): Test failure: std::future::wait_for is called with a plain long int instead of a std::chrono::duration, causing a type-mismatch in threadpool_tests.cpp.
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.
4@@ -5,17 +5,15 @@
5 #ifndef BITCOIN_UTIL_FS_H
6 #define BITCOIN_UTIL_FS_H
7
8-#include <tinyformat.h>
9+#include <tinyformat.h> // IWYU pragma: keep
// IWYU pragma: keep here?
7@@ -8,6 +8,7 @@
8
9 #include <crypto/siphash.h>
10 #include <logging/categories.h> // IWYU pragma: export
I agree that all pragmas should eventually be documented. However, addressing the existing ones here would significantly expand the scope of this PR and likely introduce more merge conflicts.
Since these older pragmas might need to be removed entirely rather than just documented, it would be best to loop in the original authors or reviewers to make that call. I think it makes the most sense to tackle this cleanup in follow-up PRs.
However, addressing the existing ones here would significantly expand the scope of this PR
Looking at the current state of this PR, there are 4 instances of // IWYU pragma: export in src/util/. Documenting or removing them, seems in scope for a PR that is fixing all issues in src/util/. If not done now, we’ll just have to come back again later and fix them anyways (and still have merge conflicts anyways, if there are any).
Since these older pragmas might need to be removed entirely rather than just documented, it would be best to loop in the original authors or reviewers to make that call.
Isn’t the best case if you can just delete the pragma, and fix the includes? Otherwise I’m not sure what call they would need to make. Either the pragma is removed, and includes fixed, there is a IWYU bug (which can be documented), or a rationale is written for keeping the pragma (even if it isn’t needed)?
Looking at the current state of this PR, there are 4 instances of
// IWYU pragma: exportinsrc/util/. Documenting or removing them, seems in scope for a PR that is fixing all issues insrc/util/.
Should be resolved now.
🚧 At least one of the CI tasks failed.
Task 32 bit ARM: https://github.com/bitcoin/bitcoin/actions/runs/23304811918/job/67775781260
LLM reason (✨ experimental): CI failed during the C++ build because logging.h references MakeUCharSpan that isn’t declared (compile error in SourceLocationHasher while compiling migrate.cpp).
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.
7@@ -8,11 +8,11 @@
8 #include <attributes.h>
9
10 #include <atomic>
11-#include <cassert> // IWYU pragma: export
This change effectively reverts fa971c09f24887d4848082c551d4eed98e7f4edc, which was motivated as follows:
This avoids having to include both headers when
assertandAssertare used at the same time.
I believe that’s a minor convenience that undermines the “include-what-you-use” paradigm.
There is another reason: A plain cassert include is dangerous, because it lacks the
0#if defined(NDEBUG)
1#error "Cannot compile without assertions!"
2#endif
My preference would be to just leave this as-is, or add a comment why it should be left as-is
I understand your idea.
However, it creates a chain of implicit includes due to this:https://github.com/bitcoin/bitcoin/blob/0d2428765d8a13e36a3cf5733417243fb0169faf/src/util/log.h#L12-L14
Maybe, a new header would be reasonable:
0// src/util/assert.h
1
2// We use `util/assert.h` to provide the `assert()` macro
3// to ensure that `NDEBUG` is not defined.
4#include <cassert> // IWYU pragma: export
5
6#if defined(NDEBUG)
7#error "Cannot compile without assertions!"
8#endif
?
Maybe, a new header would be reasonable:
How would the new header solve the chain?
The new header seems to be about assert(), but log.h uses Assume, so I think moving this to a new header seems unrelated.
How would the new header solve the chain?
src/util/log.h won’t implicitly include <cassert>.
Ok, sure, but including log.h would still “hide” check.h, so I don’t see how the situation improves. Also, with assert.h, there will then be three patters in the code:
<cassert> + assert()<util/assert.h> + assert()<util/check.h> + Assert()Not sure if this is better. Also, it seems odd to motivate this based on a temporary include in log.h, which will likely be removed soon.
Again, my preference would be to just leave this as-is for now. If there truly is a reason to change something, it should come with a proper long-term motivation, so that it can be evaluated independently.
A new circular dependency in the form of “clientversion -> util/translation -> util/check -> clientversion” appears to have been introduced.
A new circular dependency in the form of “clientversion -> util/translation -> util/check -> clientversion” appears to have been introduced.
Thanks! Fixed.
This was overlooked in bitcoin/bitcoin#34896.
7@@ -8,6 +8,8 @@
8 #include <tinyformat.h>
9 #include <util/string.h>
10
11+// Including <cassert> rather than <util/check.h>
12+// to avoid a circular header dependency.
not sure this is the right fix. It seems odd that the header can not freely be used where devs want to use it, and instead requires manual workarounds and comments explaining them.
Also, it seems odd that the license info is placed along the version info. Just because the license is printed with the version does not mean it is the version.
So it could make sense to move-only the license info to a new module:
0diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
1index ad18115..967989c 100644
2--- a/src/CMakeLists.txt
3+++ b/src/CMakeLists.txt
4@@ -100,2 +100,3 @@ add_library(bitcoin_common STATIC EXCLUDE_FROM_ALL
5 common/messages.cpp
6+ common/license_info.cpp
7 common/netif.cpp
8diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
9index 2c02d87..b0caf2d 100644
10--- a/src/bitcoin-cli.cpp
11+++ b/src/bitcoin-cli.cpp
12@@ -10,2 +10,3 @@
13 #include <common/args.h>
14+#include <common/license_info.h>
15 #include <common/system.h>
16diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
17index fdff656..d4702a9 100644
18--- a/src/bitcoin-tx.cpp
19+++ b/src/bitcoin-tx.cpp
20@@ -10,2 +10,3 @@
21 #include <common/args.h>
22+#include <common/license_info.h>
23 #include <common/system.h>
24diff --git a/src/bitcoin-util.cpp b/src/bitcoin-util.cpp
25index a6fd026..aa3fd30 100644
26--- a/src/bitcoin-util.cpp
27+++ b/src/bitcoin-util.cpp
28@@ -12,2 +12,3 @@
29 #include <common/args.h>
30+#include <common/license_info.h>
31 #include <common/system.h>
32diff --git a/src/bitcoin-wallet.cpp b/src/bitcoin-wallet.cpp
33index 6811f8c..9b0136d 100644
34--- a/src/bitcoin-wallet.cpp
35+++ b/src/bitcoin-wallet.cpp
36@@ -10,2 +10,3 @@
37 #include <common/args.h>
38+#include <common/license_info.h>
39 #include <common/system.h>
40diff --git a/src/bitcoin.cpp b/src/bitcoin.cpp
41index 5d42bb0..e17bd13 100644
42--- a/src/bitcoin.cpp
43+++ b/src/bitcoin.cpp
44@@ -9,2 +9,3 @@
45 #include <common/system.h>
46+#include <common/license_info.h>
47 #include <util/fs.h>
48diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
49index 32db3e7..3ec23f7 100644
50--- a/src/bitcoind.cpp
51+++ b/src/bitcoind.cpp
52@@ -10,2 +10,3 @@
53 #include <common/args.h>
54+#include <common/license_info.h>
55 #include <common/init.h>
56diff --git a/src/clientversion.cpp b/src/clientversion.cpp
57index 8661011..3c16990 100644
58--- a/src/clientversion.cpp
59+++ b/src/clientversion.cpp
60@@ -9,3 +9,2 @@
61 #include <util/string.h>
62-#include <util/translation.h>
63
64@@ -72,32 +71 @@ std::string FormatSubVersion(const std::string& name, int nClientVersion, const
65 }
66-
67-std::string CopyrightHolders(const std::string& strPrefix)
68-{
69- const auto copyright_devs = strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION).translated;
70- std::string strCopyrightHolders = strPrefix + copyright_devs;
71-
72- // Make sure Bitcoin Core copyright is not removed by accident
73- if (copyright_devs.find("Bitcoin Core") == std::string::npos) {
74- strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers";
75- }
76- return strCopyrightHolders;
77-}
78-
79-std::string LicenseInfo()
80-{
81- const std::string URL_SOURCE_CODE = "<https://github.com/bitcoin/bitcoin>";
82-
83- return CopyrightHolders(strprintf(_("Copyright (C) %i-%i"), 2009, COPYRIGHT_YEAR).translated + " ") + "\n" +
84- "\n" +
85- strprintf(_("Please contribute if you find %s useful. "
86- "Visit %s for further information about the software."),
87- CLIENT_NAME, "<" CLIENT_URL ">")
88- .translated +
89- "\n" +
90- strprintf(_("The source code is available from %s."), URL_SOURCE_CODE).translated +
91- "\n" +
92- "\n" +
93- _("This is experimental software.") + "\n" +
94- strprintf(_("Distributed under the MIT software license, see the accompanying file %s or %s"), "COPYING", "<https://opensource.org/license/MIT>").translated +
95- "\n";
96-}
97diff --git a/src/clientversion.h b/src/clientversion.h
98index 9d09e50..f4822a1 100644
99--- a/src/clientversion.h
100+++ b/src/clientversion.h
101@@ -36,7 +36,2 @@ std::string FormatSubVersion(const std::string& name, int nClientVersion, const
102
103-std::string CopyrightHolders(const std::string& strPrefix);
104-
105-/** Returns licensing information (for -version) */
106-std::string LicenseInfo();
107-
108 #endif // RC_INVOKED
109diff --git a/src/common/license_info.cpp b/src/common/license_info.cpp
110new file mode 100644
111index 0000000..5319085
112--- /dev/null
113+++ b/src/common/license_info.cpp
114@@ -0,0 +1,44 @@
115+// Copyright (c) The Bitcoin Core developers
116+// Distributed under the MIT software license, see the accompanying
117+// file COPYING or https://opensource.org/license/mit/.
118+
119+#include <bitcoin-build-config.h> // IWYU pragma: keep
120+
121+#include <common/license_info.h>
122+
123+#include <tinyformat.h>
124+#include <util/string.h>
125+#include <util/translation.h>
126+
127+#include <string>
128+
129+std::string CopyrightHolders(const std::string& strPrefix)
130+{
131+ const auto copyright_devs = strprintf(_(COPYRIGHT_HOLDERS), COPYRIGHT_HOLDERS_SUBSTITUTION).translated;
132+ std::string strCopyrightHolders = strPrefix + copyright_devs;
133+
134+ // Make sure Bitcoin Core copyright is not removed by accident
135+ if (copyright_devs.find("Bitcoin Core") == std::string::npos) {
136+ strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers";
137+ }
138+ return strCopyrightHolders;
139+}
140+
141+std::string LicenseInfo()
142+{
143+ const std::string URL_SOURCE_CODE = "<https://github.com/bitcoin/bitcoin>";
144+
145+ return CopyrightHolders(strprintf(_("Copyright (C) %i-%i"), 2009, COPYRIGHT_YEAR).translated + " ") + "\n" +
146+ "\n" +
147+ strprintf(_("Please contribute if you find %s useful. "
148+ "Visit %s for further information about the software."),
149+ CLIENT_NAME, "<" CLIENT_URL ">")
150+ .translated +
151+ "\n" +
152+ strprintf(_("The source code is available from %s."), URL_SOURCE_CODE).translated +
153+ "\n" +
154+ "\n" +
155+ _("This is experimental software.") + "\n" +
156+ strprintf(_("Distributed under the MIT software license, see the accompanying file %s or %s"), "COPYING", "<https://opensource.org/license/MIT>").translated +
157+ "\n";
158+}
159diff --git a/src/common/license_info.h b/src/common/license_info.h
160new file mode 100644
161index 0000000..65e9e8c
162--- /dev/null
163+++ b/src/common/license_info.h
164@@ -0,0 +1,15 @@
165+// Copyright (c) The Bitcoin Core developers
166+// Distributed under the MIT software license, see the accompanying
167+// file COPYING or https://opensource.org/license/mit/.
168+
169+#ifndef BITCOIN_COMMON_LICENSE_INFO_H
170+#define BITCOIN_COMMON_LICENSE_INFO_H
171+
172+#include <string>
173+
174+std::string CopyrightHolders(const std::string& strPrefix);
175+
176+/** Returns licensing information (for -version) */
177+std::string LicenseInfo();
178+
179+#endif // BITCOIN_COMMON_LICENSE_INFO_H
180diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
181index 553f678..5a89ce0 100644
182--- a/src/qt/splashscreen.cpp
183+++ b/src/qt/splashscreen.cpp
184@@ -9,2 +9,3 @@
185 #include <clientversion.h>
186+#include <common/license_info.h>
187 #include <common/system.h>
188diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
189index 99a3a83..5784b31 100644
190--- a/src/qt/utilitydialog.cpp
191+++ b/src/qt/utilitydialog.cpp
192@@ -14,2 +14,3 @@
193 #include <common/args.h>
194+#include <common/license_info.h>
195 #include <init.h>
196diff --git a/src/test/fuzz/string.cpp b/src/test/fuzz/string.cpp
197index d315633..4402caa 100644
198--- a/src/test/fuzz/string.cpp
199+++ b/src/test/fuzz/string.cpp
200@@ -7,2 +7,3 @@
201 #include <common/args.h>
202+#include <common/license_info.h>
203 #include <common/messages.h>
not sure this is the right fix. It seems odd that the header can not freely be used where devs want to use it, and instead requires manual workarounds and comments explaining them.
Also, it seems odd that the license info is placed along the version info. Just because the license is printed with the version does not mean it is the version.
So it could make sense to move-only the license info to a new module:
Thanks! Your patch has been incorporated.
7+
8+#include <util/check.h>
9+
10 #include <array>
11-#include <vector>
12+#include <cstddef>
Here are more details:
0 // We have a rule that if foo.h #includes bar.h, foo.cc doesn't need
1 // to #include bar.h as well, but instead gets it 'automatically'
2 // via foo.h. We say that 'foo.h' is an "associated header" for
3 // foo.cc. Make sure we ignore self-includes, though!
4 // iwyu_output.cc gets upset if a file is its own associated header.
5 if (includer == main_file_ && includee != includer &&
6 BelongsToMainCompilationUnit(includer, includee)) {
7 GetFromFileInfoMap(includer)
8 ->AddAssociatedHeader(GetFromFileInfoMap(includee));
9 VERRS(4) << "Marked " << GetFilePath(includee)
10 << " as associated header of " << GetFilePath(includer) << ".\n";
2@@ -3,23 +3,21 @@
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5 #include <util/fs.h>
6+
7+#include <util/check.h>
8 #include <util/syserror.h>
9
10+#include <cerrno>
11+#include <string>
just two nits/questions but nothing blocking
review ACK 8b49e2dd4eed93d08a3d9681d444aaf441ab0037 👘
Signature:
0untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
1RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
2trusted comment: review ACK 8b49e2dd4eed93d08a3d9681d444aaf441ab0037 👘
3KDKbNGvUrG8+dZ703Dnk1AO/tm/f0rvdF3zHf/KWuNMbUSbXHI1p9DkgMC0C2r+D7KKA2JhscuYGS5MGEJN3BA==
Code Review ACK 8b49e2dd4eed93d08a3d9681d444aaf441ab0037
I manually enabled IWYU enforcement on src/util/ (and the existing enforced modules) on master and compared the results with this PR.
0FILES_WITH_ENFORCED_IWYU='/src/(((crypto|index|kernel|primitives|univalue/(lib|test)|util|zmq)/.*|common/license_info|node/blockstorage|node/utxo_snapshot|clientversion|core_io|signet)\.cpp)'
1+ jq --arg patterns '/src/(((crypto|index|kernel|primitives|univalue/(lib|test)|util|zmq)/.*|common/license_info|node/blockstorage|node/utxo_snapshot|clientversion|core_io|signet)\.cpp)' 'map(select(.file | test($patterns)))' /home/runner/work/_temp/build/compile_commands.json
2+ jq --arg patterns '/src/(((crypto|index|kernel|primitives|univalue/(lib|test)|util|zmq)/.*|common/license_info|node/blockstorage|node/utxo_snapshot|clientversion|core_io|signet)\.cpp)' 'map(select(.file | test($patterns) | not))' /home/runner/work/_temp/build/compile_commands.json
3+ cd /home/runner/work/_temp
4+ run_iwyu compile_commands_iwyu_errors.json
5+ mv /home/runner/work/_temp/build/compile_commands_iwyu_errors.json /home/runner/work/_temp/build/compile_commands.json
6+ 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'
7+ tee /tmp/iwyu_ci.out
8(/home/runner/work/_temp/src/clientversion.h has correct #includes/fwd-decls)
9(/home/runner/work/_temp/src/clientversion.cpp has correct #includes/fwd-decls)
10(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
11(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
12(/home/runner/work/_temp/src/primitives/transaction.cpp has correct #includes/fwd-decls)
13(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
14(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
15(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
16(/home/runner/work/_temp/src/primitives/block.cpp has correct #includes/fwd-decls)
17(/home/runner/work/_temp/src/core_io.h has correct #includes/fwd-decls)
18(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
19(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
20(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
21(/home/runner/work/_temp/src/core_io.cpp has correct #includes/fwd-decls)
22(/home/runner/work/_temp/src/kernel/chainparams.h has correct #includes/fwd-decls)
23(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
24(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
25(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
26(/home/runner/work/_temp/src/kernel/chainparams.cpp has correct #includes/fwd-decls)
27(/home/runner/work/_temp/src/index/blockfilterindex.h has correct #includes/fwd-decls)
28(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
29(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
30(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
31(/home/runner/work/_temp/src/index/blockfilterindex.cpp has correct #includes/fwd-decls)
32(/home/runner/work/_temp/src/index/base.h has correct #includes/fwd-decls)
33(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
34(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
35(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
36(/home/runner/work/_temp/src/index/base.cpp has correct #includes/fwd-decls)
37(/home/runner/work/_temp/src/index/coinstatsindex.h has correct #includes/fwd-decls)
38(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
39(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
40(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
41(/home/runner/work/_temp/src/index/coinstatsindex.cpp has correct #includes/fwd-decls)
42(/home/runner/work/_temp/src/kernel/chain.h has correct #includes/fwd-decls)
43(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
44(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
45(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
46(/home/runner/work/_temp/src/kernel/chain.cpp has correct #includes/fwd-decls)
47(/home/runner/work/_temp/src/index/txospenderindex.h has correct #includes/fwd-decls)
48(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
49(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
50(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
51(/home/runner/work/_temp/src/index/txospenderindex.cpp has correct #includes/fwd-decls)
52(/home/runner/work/_temp/src/index/txindex.h has correct #includes/fwd-decls)
53(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
54(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
55(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
56(/home/runner/work/_temp/src/index/txindex.cpp has correct #includes/fwd-decls)
57(/home/runner/work/_temp/src/kernel/checks.h has correct #includes/fwd-decls)
58(/home/runner/work/_temp/src/kernel/checks.cpp has correct #includes/fwd-decls)
59(/home/runner/work/_temp/src/kernel/cs_main.h has correct #includes/fwd-decls)
60(/home/runner/work/_temp/src/kernel/cs_main.cpp has correct #includes/fwd-decls)
61(/home/runner/work/_temp/src/kernel/mempool_removal_reason.h has correct #includes/fwd-decls)
62(/home/runner/work/_temp/src/kernel/mempool_removal_reason.cpp has correct #includes/fwd-decls)
63(/home/runner/work/_temp/src/kernel/context.h has correct #includes/fwd-decls)
64(/home/runner/work/_temp/src/kernel/context.cpp has correct #includes/fwd-decls)
65(/home/runner/work/_temp/src/kernel/disconnected_transactions.h has correct #includes/fwd-decls)
66(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
67(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
68(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
69(/home/runner/work/_temp/src/kernel/disconnected_transactions.cpp has correct #includes/fwd-decls)
70(/home/runner/work/_temp/src/kernel/coinstats.h has correct #includes/fwd-decls)
71(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
72(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
73(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
74(/home/runner/work/_temp/src/kernel/coinstats.cpp has correct #includes/fwd-decls)
75(/home/runner/work/_temp/src/univalue/include/univalue.h has correct #includes/fwd-decls)
76(/home/runner/work/_temp/src/univalue/lib/univalue.cpp has correct #includes/fwd-decls)
77(/home/runner/work/_temp/src/univalue/lib/univalue_get.cpp has correct #includes/fwd-decls)
78(/home/runner/work/_temp/src/signet.h has correct #includes/fwd-decls)
79(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
80(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
81(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
82(/home/runner/work/_temp/src/signet.cpp has correct #includes/fwd-decls)
83(/home/runner/work/_temp/src/univalue/lib/univalue_read.cpp has correct #includes/fwd-decls)
84(/home/runner/work/_temp/src/univalue/lib/univalue_write.cpp has correct #includes/fwd-decls)
85(/home/runner/work/_temp/src/univalue/test/unitester.cpp has correct #includes/fwd-decls)
86(/home/runner/work/_temp/src/univalue/test/object.cpp has correct #includes/fwd-decls)
87(/home/runner/work/_temp/src/crypto/chacha20.h has correct #includes/fwd-decls)
88(/home/runner/work/_temp/src/crypto/chacha20.cpp has correct #includes/fwd-decls)
89(/home/runner/work/_temp/src/crypto/aes.h has correct #includes/fwd-decls)
90(/home/runner/work/_temp/src/crypto/aes.cpp has correct #includes/fwd-decls)
91(/home/runner/work/_temp/src/crypto/chacha20poly1305.h has correct #includes/fwd-decls)
92(/home/runner/work/_temp/src/crypto/chacha20poly1305.cpp has correct #includes/fwd-decls)
93(/home/runner/work/_temp/src/node/utxo_snapshot.h has correct #includes/fwd-decls)
94(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
95(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
96(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
97(/home/runner/work/_temp/src/node/utxo_snapshot.cpp has correct #includes/fwd-decls)
98(/home/runner/work/_temp/src/crypto/hex_base.h has correct #includes/fwd-decls)
99(/home/runner/work/_temp/src/crypto/hex_base.cpp has correct #includes/fwd-decls)
100(/home/runner/work/_temp/src/crypto/hmac_sha512.h has correct #includes/fwd-decls)
101(/home/runner/work/_temp/src/crypto/hmac_sha512.cpp has correct #includes/fwd-decls)
102(/home/runner/work/_temp/src/crypto/hkdf_sha256_32.h has correct #includes/fwd-decls)
103(/home/runner/work/_temp/src/crypto/hkdf_sha256_32.cpp has correct #includes/fwd-decls)
104(/home/runner/work/_temp/src/crypto/hmac_sha256.h has correct #includes/fwd-decls)
105(/home/runner/work/_temp/src/crypto/hmac_sha256.cpp has correct #includes/fwd-decls)
106(/home/runner/work/_temp/src/crypto/ripemd160.h has correct #includes/fwd-decls)
107(/home/runner/work/_temp/src/crypto/ripemd160.cpp has correct #includes/fwd-decls)
108(/home/runner/work/_temp/src/crypto/poly1305.h has correct #includes/fwd-decls)
109(/home/runner/work/_temp/src/crypto/poly1305.cpp has correct #includes/fwd-decls)
110(/home/runner/work/_temp/src/crypto/sha1.h has correct #includes/fwd-decls)
111(/home/runner/work/_temp/src/crypto/sha1.cpp has correct #includes/fwd-decls)
112(/home/runner/work/_temp/src/crypto/sha256_sse4.cpp has correct #includes/fwd-decls)
113(/home/runner/work/_temp/src/node/blockstorage.h has correct #includes/fwd-decls)
114(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
115(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
116(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
117(/home/runner/work/_temp/src/node/blockstorage.cpp has correct #includes/fwd-decls)
118(/home/runner/work/_temp/src/crypto/sha512.h has correct #includes/fwd-decls)
119(/home/runner/work/_temp/src/crypto/sha512.cpp has correct #includes/fwd-decls)
120(/home/runner/work/_temp/src/crypto/sha3.h has correct #includes/fwd-decls)
121(/home/runner/work/_temp/src/crypto/sha3.cpp has correct #includes/fwd-decls)
122(/home/runner/work/_temp/src/crypto/sha256.h has correct #includes/fwd-decls)
123(/home/runner/work/_temp/src/crypto/sha256.cpp has correct #includes/fwd-decls)
124(/home/runner/work/_temp/src/crypto/muhash.h has correct #includes/fwd-decls)
125(/home/runner/work/_temp/src/crypto/muhash.cpp has correct #includes/fwd-decls)
126(/home/runner/work/_temp/src/crypto/siphash.h has correct #includes/fwd-decls)
127(/home/runner/work/_temp/src/crypto/siphash.cpp has correct #includes/fwd-decls)
128(/home/runner/work/_temp/src/crypto/sha256_sse41.cpp has correct #includes/fwd-decls)
129(/home/runner/work/_temp/src/crypto/sha256_avx2.cpp has correct #includes/fwd-decls)
130(/home/runner/work/_temp/src/crypto/sha256_x86_shani.cpp has correct #includes/fwd-decls)
131(/home/runner/work/_temp/src/util/batchpriority.h has correct #includes/fwd-decls)
132(/home/runner/work/_temp/src/util/batchpriority.cpp has correct #includes/fwd-decls)
133/home/runner/work/_temp/src/util/chaintype.h should add these lines:
134#include <string_view> // for string_view
135/home/runner/work/_temp/src/util/chaintype.h should remove these lines:
136The full include-list for /home/runner/work/_temp/src/util/chaintype.h:
137#include <optional> // for optional
138#include <string> // for string
139#include <string_view> // for string_view
140---
141(/home/runner/work/_temp/src/util/chaintype.cpp has correct #includes/fwd-decls)
142(/home/runner/work/_temp/src/util/bip32.h has correct #includes/fwd-decls)
143/home/runner/work/_temp/src/util/bip32.cpp should add these lines:
144#include <optional> // for optional
145/home/runner/work/_temp/src/util/bip32.cpp should remove these lines:
146The full include-list for /home/runner/work/_temp/src/util/bip32.cpp:
147#include <util/bip32.h>
148#include <tinyformat.h> // for format, formatTruncated, formatValue, makeFormatList, strprintf
149#include <util/strencodings.h> // for ToIntegral
150#include <cstdint> // for uint32_t
151#include <cstdio> // for size_t
152#include <optional> // for optional
153#include <sstream> // for basic_istream, basic_stringstream, stringstream
154---
155(/home/runner/work/_temp/src/util/asmap.h has correct #includes/fwd-decls)
156/home/runner/work/_temp/src/util/asmap.cpp should add these lines:
157#include <string> // for basic_string
158/home/runner/work/_temp/src/util/asmap.cpp should remove these lines:
159- #include <clientversion.h> // lines 7-7
160- #include <serialize.h> // lines 9-9
161- #include <algorithm> // lines 15-15
162The full include-list for /home/runner/work/_temp/src/util/asmap.cpp:
163#include <util/asmap.h>
164#include <hash.h> // for HashWriter
165#include <streams.h> // for AutoFile
166#include <uint256.h> // for uint256
167#include <util/fs.h> // for PathToString, quoted, fopen, path
168#include <util/log.h> // for LogPrintFormatInternal, LogWarning, LogInfo
169#include <bit> // for bit_width
170#include <cassert> // for assert
171#include <cstddef> // for byte, size_t, to_integer
172#include <cstdio> // for FILE
173#include <span> // for span
174#include <string> // for basic_string
175#include <utility> // for pair
176#include <vector> // for vector
177---
178/home/runner/work/_temp/src/util/check.h should add these lines:
179#include <type_traits> // for is_constant_evaluated
180/home/runner/work/_temp/src/util/check.h should remove these lines:
181The full include-list for /home/runner/work/_temp/src/util/check.h:
182#include <attributes.h> // for LIFETIMEBOUND
183#include <atomic> // for atomic
184#include <cassert>
185#include <source_location> // for source_location
186#include <stdexcept> // for runtime_error
187#include <string> // for string
188#include <string_view> // for string_view
189#include <type_traits> // for is_constant_evaluated
190#include <utility> // for forward
191---
192(/home/runner/work/_temp/src/util/check.cpp has correct #includes/fwd-decls)
193(/home/runner/work/_temp/src/util/bytevectorhash.h has correct #includes/fwd-decls)
194/home/runner/work/_temp/src/util/bytevectorhash.cpp should add these lines:
195#include <span> // for span
196/home/runner/work/_temp/src/util/bytevectorhash.cpp should remove these lines:
197The full include-list for /home/runner/work/_temp/src/util/bytevectorhash.cpp:
198#include <util/bytevectorhash.h>
199#include <crypto/siphash.h> // for CSipHasher
200#include <random.h> // for FastRandomContext
201#include <span> // for span
202#include <vector> // for vector
203---
204(/home/runner/work/_temp/src/util/exception.h has correct #includes/fwd-decls)
205(/home/runner/work/_temp/src/util/exception.cpp has correct #includes/fwd-decls)
206/home/runner/work/_temp/src/util/feefrac.h should add these lines:
207#include <span> // for span
208#include <utility> // for pair, swap
209/home/runner/work/_temp/src/util/feefrac.h should remove these lines:
210- #include <span.h> // lines 8-8
211- #include <vector> // lines 14-14
212The full include-list for /home/runner/work/_temp/src/util/feefrac.h:
213#include <util/check.h> // for Assume, inline_assertion_check
214#include <util/overflow.h> // for CeilDiv
215#include <compare> // for strong_ordering, partial_ordering, weak_ordering
216#include <cstdint> // for int64_t, int32_t, uint32_t, uint64_t
217#include <span> // for span
218#include <utility> // for pair, swap
219---
220/home/runner/work/_temp/src/util/feefrac.cpp should add these lines:
221#include <cstddef> // for size_t
222/home/runner/work/_temp/src/util/feefrac.cpp should remove these lines:
223- #include <algorithm> // lines 6-6
224- #include <vector> // lines 8-8
225The full include-list for /home/runner/work/_temp/src/util/feefrac.cpp:
226#include <util/feefrac.h>
227#include <array> // for array
228#include <cstddef> // for size_t
229---
230(/home/runner/work/_temp/src/util/exec.h has correct #includes/fwd-decls)
231/home/runner/work/_temp/src/util/exec.cpp should add these lines:
232#include <cstdlib> // for getenv
233#include <system_error> // for error_code
234/home/runner/work/_temp/src/util/exec.cpp should remove these lines:
235- #include <util/subprocess.h> // lines 8-8
236- #include <vector> // lines 11-11
237The full include-list for /home/runner/work/_temp/src/util/exec.cpp:
238#include <util/exec.h>
239#include <unistd.h> // for size_t, execvp
240#include <util/fs.h> // for path, PathFromString, is_regular_file, operator/
241#include <cstdlib> // for getenv
242#include <string> // for basic_string, string
243#include <system_error> // for error_code
244---
245/home/runner/work/_temp/src/util/fs.h should add these lines:
246/home/runner/work/_temp/src/util/fs.h should remove these lines:
247- #include <tinyformat.h> // lines 8-8
248- #include <ostream> // lines 15-15
249- #include <system_error> // lines 18-18
250The full include-list for /home/runner/work/_temp/src/util/fs.h:
251#include <cstdio> // for FILE
252#include <filesystem>
253#include <functional> // for function
254#include <iomanip> // for quoted
255#include <ios> // for ostream
256#include <string> // for basic_string, string, u8string
257#include <string_view> // for string_view
258#include <type_traits> // for is_same_v
259#include <utility> // for move
260---
261/home/runner/work/_temp/src/util/fs.cpp should add these lines:
262/home/runner/work/_temp/src/util/fs.cpp should remove these lines:
263- #include <sys/file.h> // lines 11-11
264- #include <sys/utsname.h> // lines 12-12
265- #include <cstring> // lines 9-9
266The full include-list for /home/runner/work/_temp/src/util/fs.cpp:
267#include <util/fs.h>
268#include <fcntl.h> // for flock, F_SETLK, F_WRLCK, O_RDWR, fcntl, open
269#include <unistd.h> // for close
270#include <util/syserror.h> // for SysErrorString
271#include <cassert> // for assert
272#include <cerrno> // for errno
273#include <string> // for basic_string, string
274---
275(/home/runner/work/_temp/src/util/moneystr.h has correct #includes/fwd-decls)
276(/home/runner/work/_temp/src/util/moneystr.cpp has correct #includes/fwd-decls)
277/home/runner/work/_temp/src/util/fs_helpers.h should add these lines:
278#include <string> // for string
279/home/runner/work/_temp/src/util/fs_helpers.h should remove these lines:
280The full include-list for /home/runner/work/_temp/src/util/fs_helpers.h:
281#include <util/fs.h> // for path, perms
282#include <cstdint> // for uint64_t
283#include <cstdio> // for FILE
284#include <iosfwd> // for streamsize, streampos
285#include <limits> // for numeric_limits
286#include <optional> // for optional
287#include <string> // for string
288---
289/home/runner/work/_temp/src/util/fs_helpers.cpp should add these lines:
290#include <sys/types.h> // for off_t
291/home/runner/work/_temp/src/util/fs_helpers.cpp should remove these lines:
292The full include-list for /home/runner/work/_temp/src/util/fs_helpers.cpp:
293#include <util/fs_helpers.h>
294#include <bitcoin-build-config.h> // for HAVE_FDATASYNC, HAVE_POSIX_FALLOCATE
295#include <fcntl.h> // for posix_fallocate
296#include <sync.h> // for LOCK, MaybeCheckNotHeld, UniqueLock, GlobalMutex, GUARDED_BY
297#include <sys/resource.h> // for rlimit, RLIMIT_NOFILE, getrlimit, rlim_t, setrlimit
298#include <sys/types.h> // for off_t
299#include <unistd.h> // for fdatasync, fsync, ftruncate
300#include <util/fs.h> // for perms, FileLock, path, operator|, PathToString, fopen, filesystem_error, operator/, create_directories, exists
301#include <util/log.h> // for LogError, LogPrintFormatInternal
302#include <util/syserror.h> // for SysErrorString
303#include <cerrno> // for errno, EINVAL
304#include <fstream> // for basic_ifstream, basic_ios
305#include <map> // for map
306#include <memory> // for unique_ptr, make_unique
307#include <optional> // for optional, nullopt, nullopt_t
308#include <string> // for basic_string, string, operator<=>, operator==
309#include <system_error> // for error_code
310#include <utility> // for move
311---
312(/home/runner/work/_temp/src/util/serfloat.h has correct #includes/fwd-decls)
313(/home/runner/work/_temp/src/util/serfloat.cpp has correct #includes/fwd-decls)
314/home/runner/work/_temp/src/util/signalinterrupt.h should add these lines:
315/home/runner/work/_temp/src/util/signalinterrupt.h should remove these lines:
316- #include <cstdlib> // lines 16-16
317The full include-list for /home/runner/work/_temp/src/util/signalinterrupt.h:
318#include <util/tokenpipe.h> // for TokenPipeEnd
319#include <atomic> // for atomic
320---
321(/home/runner/work/_temp/src/util/signalinterrupt.cpp has correct #includes/fwd-decls)
322/home/runner/work/_temp/src/util/readwritefile.h should add these lines:
323#include <cstddef> // for size_t
324/home/runner/work/_temp/src/util/readwritefile.h should remove these lines:
325The full include-list for /home/runner/work/_temp/src/util/readwritefile.h:
326#include <util/fs.h> // for path
327#include <cstddef> // for size_t
328#include <limits> // for numeric_limits
329#include <string> // for string
330#include <utility> // for pair
331---
332/home/runner/work/_temp/src/util/readwritefile.cpp should add these lines:
333/home/runner/work/_temp/src/util/readwritefile.cpp should remove these lines:
334- #include <limits> // lines 12-12
335The full include-list for /home/runner/work/_temp/src/util/readwritefile.cpp:
336#include <util/readwritefile.h>
337#include <util/fs.h> // for fopen, path (ptr only)
338#include <algorithm> // for min
339#include <cstdio> // for fclose, FILE, feof, ferror, fread, fwrite
340#include <string> // for basic_string, string
341#include <utility> // for pair, make_pair
342---
343/home/runner/work/_temp/src/util/hasher.h should add these lines:
344#include <span> // for span
345/home/runner/work/_temp/src/util/hasher.h should remove these lines:
346- #include <span.h> // lines 11-11
347- #include <concepts> // lines 14-14
348The full include-list for /home/runner/work/_temp/src/util/hasher.h:
349#include <crypto/common.h> // for ReadLE64
350#include <crypto/siphash.h> // for PresaltedSipHasher
351#include <primitives/transaction.h> // for COutPoint, Txid, Wtxid
352#include <uint256.h> // for uint256
353#include <cstdint> // for uint32_t, uint64_t, uint8_t
354#include <cstring> // for size_t, memcpy
355#include <span> // for span
356---
357(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
358(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
359/home/runner/work/_temp/src/util/hasher.cpp should add these lines:
360/home/runner/work/_temp/src/util/hasher.cpp should remove these lines:
361- #include <span.h> // lines 7-7
362The full include-list for /home/runner/work/_temp/src/util/hasher.cpp:
363#include <util/hasher.h>
364#include <crypto/siphash.h> // for CSipHasher
365#include <random.h> // for FastRandomContext
366---
367(/home/runner/work/_temp/src/util/rbf.h has correct #includes/fwd-decls)
368(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
369(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
370/home/runner/work/_temp/src/util/rbf.cpp should add these lines:
371#include <vector> // for vector
372/home/runner/work/_temp/src/util/rbf.cpp should remove these lines:
373The full include-list for /home/runner/work/_temp/src/util/rbf.cpp:
374#include <util/rbf.h>
375#include <primitives/transaction.h> // for CTransaction, CTxIn
376#include <vector> // for vector
377---
378/home/runner/work/_temp/src/util/strencodings.h should add these lines:
379#include <span> // for span
380/home/runner/work/_temp/src/util/strencodings.h should remove these lines:
381- #include <crypto/hex_base.h> // lines 12-12
382- #include <algorithm> // lines 16-16
383The full include-list for /home/runner/work/_temp/src/util/strencodings.h:
384#include <span.h> // for MakeUCharSpan, UCharCast
385#include <util/string.h> // for TrimStringView
386#include <array> // for array
387#include <bit> // for bit_cast
388#include <charconv> // for from_chars
389#include <cstddef> // for size_t, byte
390#include <cstdint> // for uint8_t, uint64_t, int64_t, uint16_t
391#include <limits> // for numeric_limits
392#include <optional> // for optional, nullopt
393#include <span> // for span
394#include <string> // for string, basic_string, hash, operator==
395#include <string_view> // for string_view
396#include <system_error> // for errc
397#include <type_traits> // for is_integral_v
398#include <vector> // for vector
399---
400/home/runner/work/_temp/src/util/strencodings.cpp should add these lines:
401#include <compare> // for operator>
402#include <sstream> // for basic_stringstream, basic_ostream, operator<<, stringstream
403/home/runner/work/_temp/src/util/strencodings.cpp should remove these lines:
404- #include <array> // lines 12-12
405- #include <cstring> // lines 14-14
406- #include <ostream> // lines 17-17
407The full include-list for /home/runner/work/_temp/src/util/strencodings.cpp:
408#include <util/strencodings.h>
409#include <crypto/hex_base.h> // for HexDigit
410#include <span.h> // for MakeUCharSpan
411#include <util/overflow.h> // for CeilDiv
412#include <cassert> // for assert
413#include <compare> // for operator>
414#include <limits> // for numeric_limits
415#include <optional> // for optional, nullopt, nullopt_t, operator<=>
416#include <sstream> // for basic_stringstream, basic_ostream, operator<<, stringstream
417#include <string> // for basic_string, string, char_traits, operator+, operator<<
418#include <vector> // for vector
419---
420(/home/runner/work/_temp/src/util/syserror.h has correct #includes/fwd-decls)
421(/home/runner/work/_temp/src/util/syserror.cpp has correct #includes/fwd-decls)
422/home/runner/work/_temp/src/util/sock.h should add these lines:
423#include <cstdint> // for uint8_t
424#include <limits> // for numeric_limits
425class CThreadInterrupt;
426/home/runner/work/_temp/src/util/sock.h should remove these lines:
427- #include <util/threadinterrupt.h> // lines 9-9
428- #include <util/time.h> // lines 10-10
429The full include-list for /home/runner/work/_temp/src/util/sock.h:
430#include <compat/compat.h> // for socklen_t, SOCKET, size_t, ssize_t
431#include <chrono> // for milliseconds
432#include <cstdint> // for uint8_t
433#include <limits> // for numeric_limits
434#include <memory> // for shared_ptr, unique_ptr
435#include <span> // for span
436#include <string> // for string
437#include <unordered_map> // for unordered_map
438class CThreadInterrupt;
439---
440/home/runner/work/_temp/src/util/sock.cpp should add these lines:
441#include <algorithm> // for min, find
442#include <cassert> // for assert
443#include <compare> // for operator>=, strong_ordering
444#include <exception> // for exception
445#include <utility> // for get, make_pair, pair
446#include <vector> // for vector
447/home/runner/work/_temp/src/util/sock.cpp should remove these lines:
448- #include <common/system.h> // lines 7-7
449The full include-list for /home/runner/work/_temp/src/util/sock.cpp:
450#include <util/sock.h>
451#include <compat/compat.h> // for size_t, socklen_t, INVALID_SOCKET, ssize_t, SOCKET_ERROR, WSAGetLastError, SOCKET, USE_POLL, fcntl, MSG_PEEK, close
452#include <poll.h> // for pollfd, POLLIN, POLLOUT, POLLERR, POLLHUP, poll
453#include <span.h> // for MakeUCharSpan
454#include <tinyformat.h> // for format, formatTruncated, formatValue, makeFormatList, strprintf
455#include <util/log.h> // for LogPrintFormatInternal, LogWarning
456#include <util/syserror.h> // for SysErrorString
457#include <util/threadinterrupt.h> // for CThreadInterrupt
458#include <util/time.h> // for GetTime, count_milliseconds
459#include <algorithm> // for min, find
460#include <cassert> // for assert
461#include <compare> // for operator>=, strong_ordering
462#include <exception> // for exception
463#include <memory> // for shared_ptr, unique_ptr, make_unique
464#include <stdexcept> // for runtime_error
465#include <string> // for basic_string, string
466#include <utility> // for get, make_pair, pair
467#include <vector> // for vector
468---
469/home/runner/work/_temp/src/util/string.h should add these lines:
470#include <algorithm> // for equal, max
471#include <cstddef> // for size_t, byte
472#include <initializer_list> // for begin, end
473#include <span> // for span
474/home/runner/work/_temp/src/util/string.h should remove these lines:
475- #include <span.h> // lines 8-8
476- #include <cstring> // lines 12-12
477The full include-list for /home/runner/work/_temp/src/util/string.h:
478#include <algorithm> // for equal, max
479#include <array> // for array
480#include <cstddef> // for size_t, byte
481#include <cstdint> // for uint8_t
482#include <initializer_list> // for begin, end
483#include <locale> // for locale
484#include <optional> // for optional
485#include <span> // for span
486#include <sstream> // for basic_ostringstream, basic_ios::imbue, ostringstream
487#include <string> // for basic_string, string, operator+
488#include <string_view> // for string_view
489#include <vector> // for vector
490---
491/home/runner/work/_temp/src/util/string.cpp should add these lines:
492#include <iterator> // for distance
493#include <memory> // for to_address
494#include <stdexcept> // for runtime_error
495/home/runner/work/_temp/src/util/string.cpp should remove these lines:
496The full include-list for /home/runner/work/_temp/src/util/string.cpp:
497#include <util/string.h>
498#include <iterator> // for distance
499#include <memory> // for to_address
500#include <regex> // for regex, regex_replace
501#include <stdexcept> // for runtime_error
502#include <string> // for basic_string, string
503---
504/home/runner/work/_temp/src/util/thread.h should add these lines:
505#include <string_view> // for string_view
506/home/runner/work/_temp/src/util/thread.h should remove these lines:
507- #include <string> // lines 9-9
508The full include-list for /home/runner/work/_temp/src/util/thread.h:
509#include <functional> // for function
510#include <string_view> // for string_view
511---
512/home/runner/work/_temp/src/util/thread.cpp should add these lines:
513/home/runner/work/_temp/src/util/thread.cpp should remove these lines:
514- #include <utility> // lines 14-14
515The full include-list for /home/runner/work/_temp/src/util/thread.cpp:
516#include <util/thread.h>
517#include <util/exception.h> // for PrintExceptionContinue
518#include <util/log.h> // for LogInfo, LogPrintFormatInternal
519#include <util/threadnames.h> // for ThreadRename
520#include <exception> // for exception
521#include <functional> // for function
522#include <string> // for basic_string, string
523---
524(/home/runner/work/_temp/src/util/tokenpipe.h has correct #includes/fwd-decls)
525/home/runner/work/_temp/src/util/tokenpipe.cpp should add these lines:
526#include <sys/types.h> // for ssize_t
527/home/runner/work/_temp/src/util/tokenpipe.cpp should remove these lines:
528The full include-list for /home/runner/work/_temp/src/util/tokenpipe.cpp:
529#include <util/tokenpipe.h>
530#include <bitcoin-build-config.h> // for HAVE_DECL_PIPE2, HAVE_O_CLOEXEC
531#include <fcntl.h> // for O_CLOEXEC
532#include <sys/types.h> // for ssize_t
533#include <unistd.h> // for close, pipe2, read, write
534#include <cerrno> // for EINTR, errno
535#include <optional> // for optional, nullopt, nullopt_t
536---
537(/home/runner/work/_temp/src/util/threadnames.h has correct #includes/fwd-decls)
538/home/runner/work/_temp/src/util/threadnames.cpp should add these lines:
539#include <algorithm> // for min
540/home/runner/work/_temp/src/util/threadnames.cpp should remove these lines:
541- #include <thread> // lines 7-7
542- #include <utility> // lines 8-8
543The full include-list for /home/runner/work/_temp/src/util/threadnames.cpp:
544#include <util/threadnames.h>
545#include <sys/prctl.h> // for PR_SET_NAME, prctl
546#include <algorithm> // for min
547#include <cstring> // for memcpy, size_t
548#include <string> // for allocator, basic_string, string, char_traits, operator+
549---
550(/home/runner/work/_temp/src/util/threadinterrupt.h has correct #includes/fwd-decls)
551(/home/runner/work/_temp/src/util/threadinterrupt.cpp has correct #includes/fwd-decls)
552(/home/runner/work/_temp/src/zmq/zmqabstractnotifier.h has correct #includes/fwd-decls)
553(/home/runner/work/_temp/src/zmq/zmqabstractnotifier.cpp has correct #includes/fwd-decls)
554/home/runner/work/_temp/src/util/time.h should add these lines:
555#include <sys/time.h> // for timeval
556#include <ctime> // for time_t
557/home/runner/work/_temp/src/util/time.h should remove these lines:
558The full include-list for /home/runner/work/_temp/src/util/time.h:
559#include <sys/time.h> // for timeval
560#include <chrono>
561#include <cstdint> // for int64_t
562#include <ctime> // for time_t
563#include <optional> // for optional
564#include <string> // for string
565#include <string_view> // for string_view
566---
567/home/runner/work/_temp/src/util/time.cpp should add these lines:
568#include <compare> // for strong_ordering, operator>=, operator>
569/home/runner/work/_temp/src/util/time.cpp should remove these lines:
570- #include <compat/compat.h> // lines 8-8
571The full include-list for /home/runner/work/_temp/src/util/time.cpp:
572#include <util/time.h>
573#include <tinyformat.h> // for formatTruncated, formatValue, format, makeFormatList, strprintf
574#include <util/check.h> // for Assert, inline_assertion_check, assert
575#include <util/strencodings.h> // for ToIntegral
576#include <array> // for array
577#include <atomic> // for atomic, memory_order_relaxed
578#include <chrono> // for year_month_day, duration, seconds, time_point, hh_mm_ss, day, month, year, days, floor, operator+, operator<=>, sys_s...
579#include <compare> // for strong_ordering, operator>=, operator>
580#include <optional> // for optional
581#include <string> // for basic_string, string
582#include <string_view> // for basic_string_view, string_view
583#include <thread> // for sleep_for
584---
585(/home/runner/work/_temp/src/zmq/zmqnotificationinterface.h has correct #includes/fwd-decls)
586(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
587(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
588(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
589(/home/runner/work/_temp/src/zmq/zmqnotificationinterface.cpp has correct #includes/fwd-decls)
590(/home/runner/work/_temp/src/zmq/zmqutil.h has correct #includes/fwd-decls)
591(/home/runner/work/_temp/src/zmq/zmqutil.cpp has correct #includes/fwd-decls)
592(/home/runner/work/_temp/src/zmq/zmqrpc.h has correct #includes/fwd-decls)
593(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
594(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
595(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
596(/home/runner/work/_temp/src/zmq/zmqrpc.cpp has correct #includes/fwd-decls)
597(/home/runner/work/_temp/src/zmq/zmqpublishnotifier.h has correct #includes/fwd-decls)
598(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
599(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
600(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
601(/home/runner/work/_temp/src/zmq/zmqpublishnotifier.cpp has correct #includes/fwd-decls)
602(/home/runner/work/_temp/src/kernel/chain.h has correct #includes/fwd-decls)
603(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
604(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
605(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
606(/home/runner/work/_temp/src/kernel/chain.cpp has correct #includes/fwd-decls)
607(/home/runner/work/_temp/src/kernel/checks.h has correct #includes/fwd-decls)
608(/home/runner/work/_temp/src/kernel/checks.cpp has correct #includes/fwd-decls)
609(/home/runner/work/_temp/src/kernel/context.h has correct #includes/fwd-decls)
610(/home/runner/work/_temp/src/kernel/context.cpp has correct #includes/fwd-decls)
611(/home/runner/work/_temp/src/kernel/chainparams.h has correct #includes/fwd-decls)
612(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
613(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
614(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
615(/home/runner/work/_temp/src/kernel/chainparams.cpp has correct #includes/fwd-decls)
616(/home/runner/work/_temp/src/kernel/cs_main.h has correct #includes/fwd-decls)
617(/home/runner/work/_temp/src/kernel/cs_main.cpp has correct #includes/fwd-decls)
618(/home/runner/work/_temp/src/kernel/mempool_removal_reason.h has correct #includes/fwd-decls)
619(/home/runner/work/_temp/src/kernel/mempool_removal_reason.cpp has correct #includes/fwd-decls)
620(/home/runner/work/_temp/src/kernel/bitcoinkernel.h has correct #includes/fwd-decls)
621(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
622(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
623(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
624(/home/runner/work/_temp/src/kernel/bitcoinkernel.cpp has correct #includes/fwd-decls)
625(/home/runner/work/_temp/src/kernel/disconnected_transactions.h has correct #includes/fwd-decls)
626(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
627(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
628(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
629(/home/runner/work/_temp/src/kernel/disconnected_transactions.cpp has correct #includes/fwd-decls)
630(/home/runner/work/_temp/src/kernel/coinstats.h has correct #includes/fwd-decls)
631(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
632(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
633(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
634(/home/runner/work/_temp/src/kernel/coinstats.cpp has correct #includes/fwd-decls)
635(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
636(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
637(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
638(/home/runner/work/_temp/src/primitives/block.cpp has correct #includes/fwd-decls)
639(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
640(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
641(/home/runner/work/_temp/src/primitives/transaction.cpp has correct #includes/fwd-decls)
642/home/runner/work/_temp/src/util/chaintype.h should add these lines:
643#include <string_view> // for string_view
644/home/runner/work/_temp/src/util/chaintype.h should remove these lines:
645The full include-list for /home/runner/work/_temp/src/util/chaintype.h:
646#include <optional> // for optional
647#include <string> // for string
648#include <string_view> // for string_view
649---
650(/home/runner/work/_temp/src/util/chaintype.cpp has correct #includes/fwd-decls)
651/home/runner/work/_temp/src/util/check.h should add these lines:
652#include <type_traits> // for is_constant_evaluated
653/home/runner/work/_temp/src/util/check.h should remove these lines:
654The full include-list for /home/runner/work/_temp/src/util/check.h:
655#include <attributes.h> // for LIFETIMEBOUND
656#include <atomic> // for atomic
657#include <cassert>
658#include <source_location> // for source_location
659#include <stdexcept> // for runtime_error
660#include <string> // for string
661#include <string_view> // for string_view
662#include <type_traits> // for is_constant_evaluated
663#include <utility> // for forward
664---
665(/home/runner/work/_temp/src/util/check.cpp has correct #includes/fwd-decls)
666(/home/runner/work/_temp/src/node/utxo_snapshot.h has correct #includes/fwd-decls)
667(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
668(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
669(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
670(/home/runner/work/_temp/src/node/utxo_snapshot.cpp has correct #includes/fwd-decls)
671/home/runner/work/_temp/src/util/expected.h should add these lines:
672/home/runner/work/_temp/src/util/expected.h should remove these lines:
673- #include <cassert> // lines 11-11
674The full include-list for /home/runner/work/_temp/src/util/expected.h:
675#include <attributes.h> // for LIFETIMEBOUND
676#include <util/check.h> // for Assert
677#include <exception> // for exception
678#include <utility> // for get, move, in_place_index, forward
679#include <variant> // for get, get_if, monostate, variant
680---
681(/home/runner/work/_temp/src/util/expected.cpp has correct #includes/fwd-decls)
682(/home/runner/work/_temp/src/signet.h has correct #includes/fwd-decls)
683(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
684(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
685(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
686(/home/runner/work/_temp/src/signet.cpp has correct #includes/fwd-decls)
687/home/runner/work/_temp/src/util/feefrac.h should add these lines:
688#include <span> // for span
689#include <utility> // for pair, swap
690/home/runner/work/_temp/src/util/feefrac.h should remove these lines:
691- #include <span.h> // lines 8-8
692- #include <vector> // lines 14-14
693The full include-list for /home/runner/work/_temp/src/util/feefrac.h:
694#include <util/check.h> // for Assume, inline_assertion_check
695#include <util/overflow.h> // for CeilDiv
696#include <compare> // for strong_ordering, partial_ordering, weak_ordering
697#include <cstdint> // for int64_t, int32_t, uint32_t, uint64_t
698#include <span> // for span
699#include <utility> // for pair, swap
700---
701/home/runner/work/_temp/src/util/feefrac.cpp should add these lines:
702#include <cstddef> // for size_t
703/home/runner/work/_temp/src/util/feefrac.cpp should remove these lines:
704- #include <algorithm> // lines 6-6
705- #include <vector> // lines 8-8
706The full include-list for /home/runner/work/_temp/src/util/feefrac.cpp:
707#include <util/feefrac.h>
708#include <array> // for array
709#include <cstddef> // for size_t
710---
711/home/runner/work/_temp/src/util/fs.h should add these lines:
712/home/runner/work/_temp/src/util/fs.h should remove these lines:
713- #include <tinyformat.h> // lines 8-8
714- #include <ostream> // lines 15-15
715- #include <system_error> // lines 18-18
716The full include-list for /home/runner/work/_temp/src/util/fs.h:
717#include <cstdio> // for FILE
718#include <filesystem>
719#include <functional> // for function
720#include <iomanip> // for quoted
721#include <ios> // for ostream
722#include <string> // for basic_string, string, u8string
723#include <string_view> // for string_view
724#include <type_traits> // for is_same_v
725#include <utility> // for move
726---
727/home/runner/work/_temp/src/util/fs.cpp should add these lines:
728/home/runner/work/_temp/src/util/fs.cpp should remove these lines:
729- #include <sys/file.h> // lines 11-11
730- #include <sys/utsname.h> // lines 12-12
731- #include <cstring> // lines 9-9
732The full include-list for /home/runner/work/_temp/src/util/fs.cpp:
733#include <util/fs.h>
734#include <fcntl.h> // for flock, F_SETLK, F_WRLCK, O_RDWR, fcntl, open
735#include <unistd.h> // for close
736#include <util/syserror.h> // for SysErrorString
737#include <cassert> // for assert
738#include <cerrno> // for errno
739#include <string> // for basic_string, string
740---
741(/home/runner/work/_temp/src/node/blockstorage.h has correct #includes/fwd-decls)
742(/home/runner/work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
743(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
744(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
745(/home/runner/work/_temp/src/node/blockstorage.cpp has correct #includes/fwd-decls)
746/home/runner/work/_temp/src/util/fs_helpers.h should add these lines:
747#include <string> // for string
748/home/runner/work/_temp/src/util/fs_helpers.h should remove these lines:
749The full include-list for /home/runner/work/_temp/src/util/fs_helpers.h:
750#include <util/fs.h> // for path, perms
751#include <cstdint> // for uint64_t
752#include <cstdio> // for FILE
753#include <iosfwd> // for streamsize, streampos
754#include <limits> // for numeric_limits
755#include <optional> // for optional
756#include <string> // for string
757---
758/home/runner/work/_temp/src/util/fs_helpers.cpp should add these lines:
759#include <sys/types.h> // for off_t
760/home/runner/work/_temp/src/util/fs_helpers.cpp should remove these lines:
761The full include-list for /home/runner/work/_temp/src/util/fs_helpers.cpp:
762#include <util/fs_helpers.h>
763#include <bitcoin-build-config.h> // for HAVE_FDATASYNC, HAVE_POSIX_FALLOCATE
764#include <fcntl.h> // for posix_fallocate
765#include <sync.h> // for LOCK, MaybeCheckNotHeld, UniqueLock, GlobalMutex, GUARDED_BY
766#include <sys/resource.h> // for rlimit, RLIMIT_NOFILE, getrlimit, rlim_t, setrlimit
767#include <sys/types.h> // for off_t
768#include <unistd.h> // for fdatasync, fsync, ftruncate
769#include <util/fs.h> // for perms, FileLock, path, operator|, PathToString, fopen, filesystem_error, operator/, create_directories, exists
770#include <util/log.h> // for LogError, LogPrintFormatInternal
771#include <util/syserror.h> // for SysErrorString
772#include <cerrno> // for errno, EINVAL
773#include <fstream> // for basic_ifstream, basic_ios
774#include <map> // for map
775#include <memory> // for unique_ptr, make_unique
776#include <optional> // for optional, nullopt, nullopt_t
777#include <string> // for basic_string, string, operator<=>, operator==
778#include <system_error> // for error_code
779#include <utility> // for move
780---
781(/home/runner/work/_temp/src/util/moneystr.h has correct #includes/fwd-decls)
782(/home/runner/work/_temp/src/util/moneystr.cpp has correct #includes/fwd-decls)
783(/home/runner/work/_temp/src/util/serfloat.h has correct #includes/fwd-decls)
784(/home/runner/work/_temp/src/util/serfloat.cpp has correct #includes/fwd-decls)
785/home/runner/work/_temp/src/util/hasher.h should add these lines:
786#include <span> // for span
787/home/runner/work/_temp/src/util/hasher.h should remove these lines:
788- #include <span.h> // lines 11-11
789- #include <concepts> // lines 14-14
790The full include-list for /home/runner/work/_temp/src/util/hasher.h:
791#include <crypto/common.h> // for ReadLE64
792#include <crypto/siphash.h> // for PresaltedSipHasher
793#include <primitives/transaction.h> // for COutPoint, Txid, Wtxid
794#include <uint256.h> // for uint256
795#include <cstdint> // for uint32_t, uint64_t, uint8_t
796#include <cstring> // for size_t, memcpy
797#include <span> // for span
798---
799(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
800(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
801/home/runner/work/_temp/src/util/hasher.cpp should add these lines:
802/home/runner/work/_temp/src/util/hasher.cpp should remove these lines:
803- #include <span.h> // lines 7-7
804The full include-list for /home/runner/work/_temp/src/util/hasher.cpp:
805#include <util/hasher.h>
806#include <crypto/siphash.h> // for CSipHasher
807#include <random.h> // for FastRandomContext
808---
809(/home/runner/work/_temp/src/util/rbf.h has correct #includes/fwd-decls)
810(/home/runner/work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
811(/home/runner/work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
812/home/runner/work/_temp/src/util/rbf.cpp should add these lines:
813#include <vector> // for vector
814/home/runner/work/_temp/src/util/rbf.cpp should remove these lines:
815The full include-list for /home/runner/work/_temp/src/util/rbf.cpp:
816#include <util/rbf.h>
817#include <primitives/transaction.h> // for CTransaction, CTxIn
818#include <vector> // for vector
819---
820/home/runner/work/_temp/src/util/signalinterrupt.h should add these lines:
821/home/runner/work/_temp/src/util/signalinterrupt.h should remove these lines:
822- #include <cstdlib> // lines 16-16
823The full include-list for /home/runner/work/_temp/src/util/signalinterrupt.h:
824#include <util/tokenpipe.h> // for TokenPipeEnd
825#include <atomic> // for atomic
826---
827(/home/runner/work/_temp/src/util/signalinterrupt.cpp has correct #includes/fwd-decls)
828(/home/runner/work/_temp/src/util/tokenpipe.h has correct #includes/fwd-decls)
829/home/runner/work/_temp/src/util/tokenpipe.cpp should add these lines:
830#include <sys/types.h> // for ssize_t
831/home/runner/work/_temp/src/util/tokenpipe.cpp should remove these lines:
832The full include-list for /home/runner/work/_temp/src/util/tokenpipe.cpp:
833#include <util/tokenpipe.h>
834#include <bitcoin-build-config.h> // for HAVE_DECL_PIPE2, HAVE_O_CLOEXEC
835#include <fcntl.h> // for O_CLOEXEC
836#include <sys/types.h> // for ssize_t
837#include <unistd.h> // for close, pipe2, read, write
838#include <cerrno> // for EINTR, errno
839#include <optional> // for optional, nullopt, nullopt_t
840---
841(/home/runner/work/_temp/src/util/threadnames.h has correct #includes/fwd-decls)
842/home/runner/work/_temp/src/util/threadnames.cpp should add these lines:
843#include <algorithm> // for min
844/home/runner/work/_temp/src/util/threadnames.cpp should remove these lines:
845- #include <thread> // lines 7-7
846- #include <utility> // lines 8-8
847The full include-list for /home/runner/work/_temp/src/util/threadnames.cpp:
848#include <util/threadnames.h>
849#include <sys/prctl.h> // for PR_SET_NAME, prctl
850#include <algorithm> // for min
851#include <cstring> // for memcpy, size_t
852#include <string> // for allocator, basic_string, string, char_traits, operator+
853---
854(/home/runner/work/_temp/src/util/syserror.h has correct #includes/fwd-decls)
855(/home/runner/work/_temp/src/util/syserror.cpp has correct #includes/fwd-decls)
856/home/runner/work/_temp/src/util/time.h should add these lines:
857#include <sys/time.h> // for timeval
858#include <ctime> // for time_t
859/home/runner/work/_temp/src/util/time.h should remove these lines:
860The full include-list for /home/runner/work/_temp/src/util/time.h:
861#include <sys/time.h> // for timeval
862#include <chrono>
863#include <cstdint> // for int64_t
864#include <ctime> // for time_t
865#include <optional> // for optional
866#include <string> // for string
867#include <string_view> // for string_view
868---
869/home/runner/work/_temp/src/util/time.cpp should add these lines:
870#include <compare> // for strong_ordering, operator>=, operator>
871/home/runner/work/_temp/src/util/time.cpp should remove these lines:
872- #include <compat/compat.h> // lines 8-8
873The full include-list for /home/runner/work/_temp/src/util/time.cpp:
874#include <util/time.h>
875#include <tinyformat.h> // for formatTruncated, formatValue, format, makeFormatList, strprintf
876#include <util/check.h> // for Assert, inline_assertion_check, assert
877#include <util/strencodings.h> // for ToIntegral
878#include <array> // for array
879#include <atomic> // for atomic, memory_order_relaxed
880#include <chrono> // for year_month_day, duration, seconds, time_point, hh_mm_ss, day, month, year, days, floor, operator+, operator<=>, sys_s...
881#include <compare> // for strong_ordering, operator>=, operator>
882#include <optional> // for optional
883#include <string> // for basic_string, string
884#include <string_view> // for basic_string_view, string_view
885#include <thread> // for sleep_for
886---
887+ python3 /include-what-you-use/fix_includes.py --nosafe_headers
888(skipping /home/runner/work/_temp/src/clientversion.h: iwyu reports no contentful changes)
889(skipping /home/runner/work/_temp/src/clientversion.cpp: iwyu reports no contentful changes)
890(skipping /home/runner/work/_temp/src/primitives/transaction.h: iwyu reports no contentful changes)
891(skipping /home/runner/work/_temp/src/primitives/transaction_identifier.h: iwyu reports no contentful changes)
892(skipping /home/runner/work/_temp/src/primitives/transaction.cpp: iwyu reports no contentful changes)
893(skipping /home/runner/work/_temp/src/primitives/block.h: iwyu reports no contentful changes)
894(skipping /home/runner/work/_temp/src/primitives/block.cpp: iwyu reports no contentful changes)
895(skipping /home/runner/work/_temp/src/core_io.h: iwyu reports no contentful changes)
896(skipping /home/runner/work/_temp/src/core_io.cpp: iwyu reports no contentful changes)
897(skipping /home/runner/work/_temp/src/kernel/chainparams.h: iwyu reports no contentful changes)
898(skipping /home/runner/work/_temp/src/kernel/chainparams.cpp: iwyu reports no contentful changes)
899(skipping /home/runner/work/_temp/src/index/blockfilterindex.h: iwyu reports no contentful changes)
900(skipping /home/runner/work/_temp/src/index/blockfilterindex.cpp: iwyu reports no contentful changes)
901(skipping /home/runner/work/_temp/src/index/base.h: iwyu reports no contentful changes)
902(skipping /home/runner/work/_temp/src/index/base.cpp: iwyu reports no contentful changes)
903(skipping /home/runner/work/_temp/src/index/coinstatsindex.h: iwyu reports no contentful changes)
904(skipping /home/runner/work/_temp/src/index/coinstatsindex.cpp: iwyu reports no contentful changes)
905(skipping /home/runner/work/_temp/src/kernel/chain.h: iwyu reports no contentful changes)
906(skipping /home/runner/work/_temp/src/kernel/chain.cpp: iwyu reports no contentful changes)
907(skipping /home/runner/work/_temp/src/index/txospenderindex.h: iwyu reports no contentful changes)
908(skipping /home/runner/work/_temp/src/index/txospenderindex.cpp: iwyu reports no contentful changes)
909(skipping /home/runner/work/_temp/src/index/txindex.h: iwyu reports no contentful changes)
910(skipping /home/runner/work/_temp/src/index/txindex.cpp: iwyu reports no contentful changes)
911(skipping /home/runner/work/_temp/src/kernel/checks.h: iwyu reports no contentful changes)
912(skipping /home/runner/work/_temp/src/kernel/checks.cpp: iwyu reports no contentful changes)
913(skipping /home/runner/work/_temp/src/kernel/cs_main.h: iwyu reports no contentful changes)
914(skipping /home/runner/work/_temp/src/kernel/cs_main.cpp: iwyu reports no contentful changes)
915(skipping /home/runner/work/_temp/src/kernel/mempool_removal_reason.h: iwyu reports no contentful changes)
916(skipping /home/runner/work/_temp/src/kernel/mempool_removal_reason.cpp: iwyu reports no contentful changes)
917(skipping /home/runner/work/_temp/src/kernel/context.h: iwyu reports no contentful changes)
918(skipping /home/runner/work/_temp/src/kernel/context.cpp: iwyu reports no contentful changes)
919(skipping /home/runner/work/_temp/src/kernel/disconnected_transactions.h: iwyu reports no contentful changes)
920(skipping /home/runner/work/_temp/src/kernel/disconnected_transactions.cpp: iwyu reports no contentful changes)
921(skipping /home/runner/work/_temp/src/kernel/coinstats.h: iwyu reports no contentful changes)
922(skipping /home/runner/work/_temp/src/kernel/coinstats.cpp: iwyu reports no contentful changes)
923(skipping /home/runner/work/_temp/src/univalue/include/univalue.h: iwyu reports no contentful changes)
924(skipping /home/runner/work/_temp/src/univalue/lib/univalue.cpp: iwyu reports no contentful changes)
925(skipping /home/runner/work/_temp/src/univalue/lib/univalue_get.cpp: iwyu reports no contentful changes)
926(skipping /home/runner/work/_temp/src/signet.h: iwyu reports no contentful changes)
927(skipping /home/runner/work/_temp/src/signet.cpp: iwyu reports no contentful changes)
928(skipping /home/runner/work/_temp/src/univalue/lib/univalue_read.cpp: iwyu reports no contentful changes)
929(skipping /home/runner/work/_temp/src/univalue/lib/univalue_write.cpp: iwyu reports no contentful changes)
930(skipping /home/runner/work/_temp/src/univalue/test/unitester.cpp: iwyu reports no contentful changes)
931(skipping /home/runner/work/_temp/src/univalue/test/object.cpp: iwyu reports no contentful changes)
932(skipping /home/runner/work/_temp/src/crypto/chacha20.h: iwyu reports no contentful changes)
933(skipping /home/runner/work/_temp/src/crypto/chacha20.cpp: iwyu reports no contentful changes)
934(skipping /home/runner/work/_temp/src/crypto/aes.h: iwyu reports no contentful changes)
935(skipping /home/runner/work/_temp/src/crypto/aes.cpp: iwyu reports no contentful changes)
936(skipping /home/runner/work/_temp/src/crypto/chacha20poly1305.h: iwyu reports no contentful changes)
937(skipping /home/runner/work/_temp/src/crypto/chacha20poly1305.cpp: iwyu reports no contentful changes)
938(skipping /home/runner/work/_temp/src/node/utxo_snapshot.h: iwyu reports no contentful changes)
939(skipping /home/runner/work/_temp/src/node/utxo_snapshot.cpp: iwyu reports no contentful changes)
940(skipping /home/runner/work/_temp/src/crypto/hex_base.h: iwyu reports no contentful changes)
941(skipping /home/runner/work/_temp/src/crypto/hex_base.cpp: iwyu reports no contentful changes)
942(skipping /home/runner/work/_temp/src/crypto/hmac_sha512.h: iwyu reports no contentful changes)
943(skipping /home/runner/work/_temp/src/crypto/hmac_sha512.cpp: iwyu reports no contentful changes)
944(skipping /home/runner/work/_temp/src/crypto/hkdf_sha256_32.h: iwyu reports no contentful changes)
945(skipping /home/runner/work/_temp/src/crypto/hkdf_sha256_32.cpp: iwyu reports no contentful changes)
946(skipping /home/runner/work/_temp/src/crypto/hmac_sha256.h: iwyu reports no contentful changes)
947(skipping /home/runner/work/_temp/src/crypto/hmac_sha256.cpp: iwyu reports no contentful changes)
948(skipping /home/runner/work/_temp/src/crypto/ripemd160.h: iwyu reports no contentful changes)
949(skipping /home/runner/work/_temp/src/crypto/ripemd160.cpp: iwyu reports no contentful changes)
950(skipping /home/runner/work/_temp/src/crypto/poly1305.h: iwyu reports no contentful changes)
951(skipping /home/runner/work/_temp/src/crypto/poly1305.cpp: iwyu reports no contentful changes)
952(skipping /home/runner/work/_temp/src/crypto/sha1.h: iwyu reports no contentful changes)
953(skipping /home/runner/work/_temp/src/crypto/sha1.cpp: iwyu reports no contentful changes)
954(skipping /home/runner/work/_temp/src/crypto/sha256_sse4.cpp: iwyu reports no contentful changes)
955(skipping /home/runner/work/_temp/src/node/blockstorage.h: iwyu reports no contentful changes)
956(skipping /home/runner/work/_temp/src/node/blockstorage.cpp: iwyu reports no contentful changes)
957(skipping /home/runner/work/_temp/src/crypto/sha512.h: iwyu reports no contentful changes)
958(skipping /home/runner/work/_temp/src/crypto/sha512.cpp: iwyu reports no contentful changes)
959(skipping /home/runner/work/_temp/src/crypto/sha3.h: iwyu reports no contentful changes)
960(skipping /home/runner/work/_temp/src/crypto/sha3.cpp: iwyu reports no contentful changes)
961(skipping /home/runner/work/_temp/src/crypto/sha256.h: iwyu reports no contentful changes)
962(skipping /home/runner/work/_temp/src/crypto/sha256.cpp: iwyu reports no contentful changes)
963(skipping /home/runner/work/_temp/src/crypto/muhash.h: iwyu reports no contentful changes)
964(skipping /home/runner/work/_temp/src/crypto/muhash.cpp: iwyu reports no contentful changes)
965(skipping /home/runner/work/_temp/src/crypto/siphash.h: iwyu reports no contentful changes)
966(skipping /home/runner/work/_temp/src/crypto/siphash.cpp: iwyu reports no contentful changes)
967(skipping /home/runner/work/_temp/src/crypto/sha256_sse41.cpp: iwyu reports no contentful changes)
968(skipping /home/runner/work/_temp/src/crypto/sha256_avx2.cpp: iwyu reports no contentful changes)
969(skipping /home/runner/work/_temp/src/crypto/sha256_x86_shani.cpp: iwyu reports no contentful changes)
970(skipping /home/runner/work/_temp/src/util/batchpriority.h: iwyu reports no contentful changes)
971(skipping /home/runner/work/_temp/src/util/batchpriority.cpp: iwyu reports no contentful changes)
972(skipping /home/runner/work/_temp/src/util/chaintype.cpp: iwyu reports no contentful changes)
973(skipping /home/runner/work/_temp/src/util/bip32.h: iwyu reports no contentful changes)
974(skipping /home/runner/work/_temp/src/util/asmap.h: iwyu reports no contentful changes)
975(skipping /home/runner/work/_temp/src/util/check.cpp: iwyu reports no contentful changes)
976(skipping /home/runner/work/_temp/src/util/bytevectorhash.h: iwyu reports no contentful changes)
977(skipping /home/runner/work/_temp/src/util/exception.h: iwyu reports no contentful changes)
978(skipping /home/runner/work/_temp/src/util/exception.cpp: iwyu reports no contentful changes)
979(skipping /home/runner/work/_temp/src/util/exec.h: iwyu reports no contentful changes)
980(skipping /home/runner/work/_temp/src/util/moneystr.h: iwyu reports no contentful changes)
981(skipping /home/runner/work/_temp/src/util/moneystr.cpp: iwyu reports no contentful changes)
982(skipping /home/runner/work/_temp/src/util/serfloat.h: iwyu reports no contentful changes)
983(skipping /home/runner/work/_temp/src/util/serfloat.cpp: iwyu reports no contentful changes)
984(skipping /home/runner/work/_temp/src/util/signalinterrupt.cpp: iwyu reports no contentful changes)
985(skipping /home/runner/work/_temp/src/util/rbf.h: iwyu reports no contentful changes)
986(skipping /home/runner/work/_temp/src/util/syserror.h: iwyu reports no contentful changes)
987(skipping /home/runner/work/_temp/src/util/syserror.cpp: iwyu reports no contentful changes)
988(skipping /home/runner/work/_temp/src/util/tokenpipe.h: iwyu reports no contentful changes)
989(skipping /home/runner/work/_temp/src/util/threadnames.h: iwyu reports no contentful changes)
990(skipping /home/runner/work/_temp/src/util/threadinterrupt.h: iwyu reports no contentful changes)
991(skipping /home/runner/work/_temp/src/util/threadinterrupt.cpp: iwyu reports no contentful changes)
992(skipping /home/runner/work/_temp/src/zmq/zmqabstractnotifier.h: iwyu reports no contentful changes)
993(skipping /home/runner/work/_temp/src/zmq/zmqabstractnotifier.cpp: iwyu reports no contentful changes)
994(skipping /home/runner/work/_temp/src/zmq/zmqnotificationinterface.h: iwyu reports no contentful changes)
995(skipping /home/runner/work/_temp/src/zmq/zmqnotificationinterface.cpp: iwyu reports no contentful changes)
996(skipping /home/runner/work/_temp/src/zmq/zmqutil.h: iwyu reports no contentful changes)
997(skipping /home/runner/work/_temp/src/zmq/zmqutil.cpp: iwyu reports no contentful changes)
998(skipping /home/runner/work/_temp/src/zmq/zmqrpc.h: iwyu reports no contentful changes)
999(skipping /home/runner/work/_temp/src/zmq/zmqrpc.cpp: iwyu reports no contentful changes)
1000(skipping /home/runner/work/_temp/src/zmq/zmqpublishnotifier.h: iwyu reports no contentful changes)
1001(skipping /home/runner/work/_temp/src/zmq/zmqpublishnotifier.cpp: iwyu reports no contentful changes)
1002(skipping /home/runner/work/_temp/src/kernel/bitcoinkernel.h: iwyu reports no contentful changes)
1003(skipping /home/runner/work/_temp/src/kernel/bitcoinkernel.cpp: iwyu reports no contentful changes)
1004(skipping /home/runner/work/_temp/src/util/expected.cpp: iwyu reports no contentful changes)
1005>>> Fixing #includes in '/home/runner/work/_temp/src/util/chaintype.h'
1006>>> Fixing #includes in '/home/runner/work/_temp/src/util/bip32.cpp'
1007>>> Fixing #includes in '/home/runner/work/_temp/src/util/asmap.cpp'
1008>>> Fixing #includes in '/home/runner/work/_temp/src/util/check.h'
1009>>> Fixing #includes in '/home/runner/work/_temp/src/util/bytevectorhash.cpp'
1010>>> Fixing #includes in '/home/runner/work/_temp/src/util/feefrac.h'
1011>>> Fixing #includes in '/home/runner/work/_temp/src/util/feefrac.cpp'
1012>>> Fixing #includes in '/home/runner/work/_temp/src/util/exec.cpp'
1013>>> Fixing #includes in '/home/runner/work/_temp/src/util/fs.h'
1014>>> Fixing #includes in '/home/runner/work/_temp/src/util/fs.cpp'
1015>>> Fixing #includes in '/home/runner/work/_temp/src/util/fs_helpers.h'
1016>>> Fixing #includes in '/home/runner/work/_temp/src/util/fs_helpers.cpp'
1017>>> Fixing #includes in '/home/runner/work/_temp/src/util/signalinterrupt.h'
1018>>> Fixing #includes in '/home/runner/work/_temp/src/util/readwritefile.h'
1019>>> Fixing #includes in '/home/runner/work/_temp/src/util/readwritefile.cpp'
1020>>> Fixing #includes in '/home/runner/work/_temp/src/util/hasher.h'
1021>>> Fixing #includes in '/home/runner/work/_temp/src/util/hasher.cpp'
1022>>> Fixing #includes in '/home/runner/work/_temp/src/util/rbf.cpp'
1023>>> Fixing #includes in '/home/runner/work/_temp/src/util/strencodings.h'
1024>>> Fixing #includes in '/home/runner/work/_temp/src/util/strencodings.cpp'
1025>>> Fixing #includes in '/home/runner/work/_temp/src/util/sock.h'
1026>>> Fixing #includes in '/home/runner/work/_temp/src/util/sock.cpp'
1027>>> Fixing #includes in '/home/runner/work/_temp/src/util/string.h'
1028>>> Fixing #includes in '/home/runner/work/_temp/src/util/string.cpp'
1029>>> Fixing #includes in '/home/runner/work/_temp/src/util/thread.h'
1030>>> Fixing #includes in '/home/runner/work/_temp/src/util/thread.cpp'
1031>>> Fixing #includes in '/home/runner/work/_temp/src/util/tokenpipe.cpp'
1032>>> Fixing #includes in '/home/runner/work/_temp/src/util/threadnames.cpp'
1033>>> Fixing #includes in '/home/runner/work/_temp/src/util/time.h'
1034>>> Fixing #includes in '/home/runner/work/_temp/src/util/time.cpp'
1035>>> Fixing #includes in '/home/runner/work/_temp/src/util/expected.h'
1036IWYU edited 31 files on your behalf.
1037+ git diff -U1
1038+ ./contrib/devtools/clang-format-diff.py -binary=clang-format-22 -p1 -i -v
1039Formatting src/util/asmap.cpp
1040Formatting src/util/bip32.cpp
1041Formatting src/util/bytevectorhash.cpp
1042Formatting src/util/chaintype.h
1043Formatting src/util/check.h
1044Formatting src/util/exec.cpp
1045Formatting src/util/expected.h
1046Formatting src/util/feefrac.cpp
1047Formatting src/util/feefrac.h
1048Formatting src/util/fs.cpp
1049Formatting src/util/fs.h
1050Formatting src/util/fs_helpers.cpp
1051Formatting src/util/fs_helpers.h
1052Formatting src/util/hasher.cpp
1053Formatting src/util/hasher.h
1054Formatting src/util/rbf.cpp
1055Formatting src/util/readwritefile.cpp
1056Formatting src/util/readwritefile.h
1057Formatting src/util/signalinterrupt.h
1058Formatting src/util/sock.cpp
1059Formatting src/util/sock.h
1060Formatting src/util/strencodings.cpp
1061Formatting src/util/strencodings.h
1062Formatting src/util/string.cpp
1063Formatting src/util/string.h
1064Formatting src/util/thread.cpp
1065Formatting src/util/thread.h
1066Formatting src/util/threadnames.cpp
1067Formatting src/util/time.cpp
1068Formatting src/util/time.h
1069Formatting src/util/tokenpipe.cpp
1070+ git --no-pager diff --exit-code
1071diff --git a/src/util/asmap.cpp b/src/util/asmap.cpp
1072index f8b5a52..c388596 100644
1073--- a/src/util/asmap.cpp
1074+++ b/src/util/asmap.cpp
1075@@ -4,20 +4,18 @@
1076
1077 #include <util/asmap.h>
1078
1079-#include <clientversion.h>
1080 #include <hash.h>
1081-#include <serialize.h>
1082 #include <streams.h>
1083 #include <uint256.h>
1084 #include <util/fs.h>
1085 #include <util/log.h>
1086
1087-#include <algorithm>
1088 #include <bit>
1089 #include <cassert>
1090 #include <cstddef>
1091 #include <cstdio>
1092 #include <span>
1093+#include <string>
1094 #include <utility>
1095 #include <vector>
1096
1097diff --git a/src/util/bip32.cpp b/src/util/bip32.cpp
1098index db40bfb..2488eac 100644
1099--- a/src/util/bip32.cpp
1100+++ b/src/util/bip32.cpp
1101@@ -2,12 +2,14 @@
1102 // Distributed under the MIT software license, see the accompanying
1103 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
1104
1105-#include <tinyformat.h>
1106 #include <util/bip32.h>
1107+
1108+#include <tinyformat.h>
1109 #include <util/strencodings.h>
1110
1111 #include <cstdint>
1112 #include <cstdio>
1113+#include <optional>
1114 #include <sstream>
1115
1116 bool ParseHDKeypath(const std::string& keypath_str, std::vector<uint32_t>& keypath)
1117diff --git a/src/util/bytevectorhash.cpp b/src/util/bytevectorhash.cpp
1118index 943517a..4093030 100644
1119--- a/src/util/bytevectorhash.cpp
1120+++ b/src/util/bytevectorhash.cpp
1121@@ -2,10 +2,12 @@
1122 // Distributed under the MIT software license, see the accompanying
1123 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
1124
1125+#include <util/bytevectorhash.h>
1126+
1127 #include <crypto/siphash.h>
1128 #include <random.h>
1129-#include <util/bytevectorhash.h>
1130
1131+#include <span>
1132 #include <vector>
1133
1134 ByteVectorHash::ByteVectorHash() :
1135diff --git a/src/util/chaintype.h b/src/util/chaintype.h
1136index 3b246ea..caae77c 100644
1137--- a/src/util/chaintype.h
1138+++ b/src/util/chaintype.h
1139@@ -7,6 +7,7 @@
1140
1141 #include <optional>
1142 #include <string>
1143+#include <string_view>
1144
1145 enum class ChainType {
1146 MAIN,
1147diff --git a/src/util/check.h b/src/util/check.h
1148index 34801ca..ef4040f 100644
1149--- a/src/util/check.h
1150+++ b/src/util/check.h
1151@@ -13,6 +13,7 @@
1152 #include <stdexcept>
1153 #include <string>
1154 #include <string_view>
1155+#include <type_traits>
1156 #include <utility>
1157
1158 constexpr bool G_FUZZING_BUILD{
1159diff --git a/src/util/exec.cpp b/src/util/exec.cpp
1160index 6b14061..89aa114 100644
1161--- a/src/util/exec.cpp
1162+++ b/src/util/exec.cpp
1163@@ -5,10 +5,10 @@
1164 #include <util/exec.h>
1165
1166 #include <util/fs.h>
1167-#include <util/subprocess.h>
1168
1169+#include <cstdlib>
1170 #include <string>
1171-#include <vector>
1172+#include <system_error>
1173
1174 #ifdef WIN32
1175 #include <process.h>
1176diff --git a/src/util/expected.h b/src/util/expected.h
1177index 66fb98e..c88c6de 100644
1178--- a/src/util/expected.h
1179+++ b/src/util/expected.h
1180@@ -8,7 +8,6 @@
1181 #include <attributes.h>
1182 #include <util/check.h>
1183
1184-#include <cassert>
1185 #include <exception>
1186 #include <utility>
1187 #include <variant>
1188diff --git a/src/util/feefrac.cpp b/src/util/feefrac.cpp
1189index 68ba2b6..3c4664f 100644
1190--- a/src/util/feefrac.cpp
1191+++ b/src/util/feefrac.cpp
1192@@ -3,9 +3,9 @@
1193 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
1194
1195 #include <util/feefrac.h>
1196-#include <algorithm>
1197+
1198 #include <array>
1199-#include <vector>
1200+#include <cstddef>
1201
1202 std::partial_ordering CompareChunks(std::span<const FeeFrac> chunks0, std::span<const FeeFrac> chunks1)
1203 {
1204diff --git a/src/util/feefrac.h b/src/util/feefrac.h
1205index 25d87d3..30ec6b0 100644
1206--- a/src/util/feefrac.h
1207+++ b/src/util/feefrac.h
1208@@ -5,13 +5,13 @@
1209 #ifndef BITCOIN_UTIL_FEEFRAC_H
1210 #define BITCOIN_UTIL_FEEFRAC_H
1211
1212-#include <span.h>
1213 #include <util/check.h>
1214 #include <util/overflow.h>
1215
1216 #include <compare>
1217 #include <cstdint>
1218-#include <vector>
1219+#include <span>
1220+#include <utility>
1221
1222 /** Data structure storing a fee and size, ordered by increasing fee/size.
1223 *
1224diff --git a/src/util/fs.cpp b/src/util/fs.cpp
1225index 692f671..eb50260 100644
1226--- a/src/util/fs.cpp
1227+++ b/src/util/fs.cpp
1228@@ -6,14 +6,12 @@
1229 #include <util/syserror.h>
1230
1231 #ifndef WIN32
1232-#include <cstring>
1233 #include <fcntl.h>
1234-#include <sys/file.h>
1235-#include <sys/utsname.h>
1236 #include <unistd.h>
1237 #else
1238-#include <limits>
1239 #include <windows.h>
1240+
1241+#include <limits>
1242 #endif
1243
1244 #include <cassert>
1245diff --git a/src/util/fs.h b/src/util/fs.h
1246index dce371c..8353a67 100644
1247--- a/src/util/fs.h
1248+++ b/src/util/fs.h
1249@@ -5,17 +5,13 @@
1250 #ifndef BITCOIN_UTIL_FS_H
1251 #define BITCOIN_UTIL_FS_H
1252
1253-#include <tinyformat.h>
1254-
1255 #include <cstdio>
1256 #include <filesystem> // IWYU pragma: export
1257 #include <functional>
1258 #include <iomanip>
1259 #include <ios>
1260-#include <ostream>
1261 #include <string>
1262 #include <string_view>
1263-#include <system_error>
1264 #include <type_traits>
1265 #include <utility>
1266
1267diff --git a/src/util/fs_helpers.cpp b/src/util/fs_helpers.cpp
1268index e7780d7..db7512b 100644
1269--- a/src/util/fs_helpers.cpp
1270+++ b/src/util/fs_helpers.cpp
1271@@ -8,6 +8,7 @@
1272 #include <util/fs_helpers.h>
1273
1274 #include <sync.h>
1275+#include <sys/types.h>
1276 #include <util/fs.h>
1277 #include <util/log.h>
1278 #include <util/syserror.h>
1279diff --git a/src/util/fs_helpers.h b/src/util/fs_helpers.h
1280index d39ae11..face17f 100644
1281--- a/src/util/fs_helpers.h
1282+++ b/src/util/fs_helpers.h
1283@@ -13,6 +13,7 @@
1284 #include <iosfwd>
1285 #include <limits>
1286 #include <optional>
1287+#include <string>
1288
1289 #ifdef __APPLE__
1290 enum class FSType {
1291diff --git a/src/util/hasher.cpp b/src/util/hasher.cpp
1292index 3d5ffcf..b12f745 100644
1293--- a/src/util/hasher.cpp
1294+++ b/src/util/hasher.cpp
1295@@ -2,10 +2,10 @@
1296 // Distributed under the MIT software license, see the accompanying
1297 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
1298
1299+#include <util/hasher.h>
1300+
1301 #include <crypto/siphash.h>
1302 #include <random.h>
1303-#include <span.h>
1304-#include <util/hasher.h>
1305
1306 SaltedUint256Hasher::SaltedUint256Hasher() : m_hasher{
1307 FastRandomContext().rand64(),
1308diff --git a/src/util/hasher.h b/src/util/hasher.h
1309index 02c7703..7e74c67 100644
1310--- a/src/util/hasher.h
1311+++ b/src/util/hasher.h
1312@@ -8,12 +8,11 @@
1313 #include <crypto/common.h>
1314 #include <crypto/siphash.h>
1315 #include <primitives/transaction.h>
1316-#include <span.h>
1317 #include <uint256.h>
1318
1319-#include <concepts>
1320 #include <cstdint>
1321 #include <cstring>
1322+#include <span>
1323
1324 class SaltedUint256Hasher
1325 {
1326diff --git a/src/util/rbf.cpp b/src/util/rbf.cpp
1327index bc28c6b..82ef020 100644
1328--- a/src/util/rbf.cpp
1329+++ b/src/util/rbf.cpp
1330@@ -6,6 +6,8 @@
1331
1332 #include <primitives/transaction.h>
1333
1334+#include <vector>
1335+
1336 bool SignalsOptInRBF(const CTransaction &tx)
1337 {
1338 for (const CTxIn &txin : tx.vin) {
1339diff --git a/src/util/readwritefile.cpp b/src/util/readwritefile.cpp
1340index 82b596f..6a9eeb2 100644
1341--- a/src/util/readwritefile.cpp
1342+++ b/src/util/readwritefile.cpp
1343@@ -9,7 +9,6 @@
1344
1345 #include <algorithm>
1346 #include <cstdio>
1347-#include <limits>
1348 #include <string>
1349 #include <utility>
1350
1351diff --git a/src/util/readwritefile.h b/src/util/readwritefile.h
1352index 2a9ccf5..54a5a30 100644
1353--- a/src/util/readwritefile.h
1354+++ b/src/util/readwritefile.h
1355@@ -7,6 +7,7 @@
1356
1357 #include <util/fs.h>
1358
1359+#include <cstddef>
1360 #include <limits>
1361 #include <string>
1362 #include <utility>
1363diff --git a/src/util/signalinterrupt.h b/src/util/signalinterrupt.h
1364index 027dd15..5a23cd1 100644
1365--- a/src/util/signalinterrupt.h
1366+++ b/src/util/signalinterrupt.h
1367@@ -13,7 +13,6 @@
1368 #endif
1369
1370 #include <atomic>
1371-#include <cstdlib>
1372
1373 namespace util {
1374 /**
1375diff --git a/src/util/sock.cpp b/src/util/sock.cpp
1376index a06ab7a..7043a4c 100644
1377--- a/src/util/sock.cpp
1378+++ b/src/util/sock.cpp
1379@@ -4,7 +4,6 @@
1380
1381 #include <util/sock.h>
1382
1383-#include <common/system.h>
1384 #include <compat/compat.h>
1385 #include <span.h>
1386 #include <tinyformat.h>
1387@@ -13,9 +12,15 @@
1388 #include <util/threadinterrupt.h>
1389 #include <util/time.h>
1390
1391+#include <algorithm>
1392+#include <cassert>
1393+#include <compare>
1394+#include <exception>
1395 #include <memory>
1396 #include <stdexcept>
1397 #include <string>
1398+#include <utility>
1399+#include <vector>
1400
1401 #ifdef USE_POLL
1402 #include <poll.h>
1403diff --git a/src/util/sock.h b/src/util/sock.h
1404index 8c51b8e..781638a 100644
1405--- a/src/util/sock.h
1406+++ b/src/util/sock.h
1407@@ -6,15 +6,17 @@
1408 #define BITCOIN_UTIL_SOCK_H
1409
1410 #include <compat/compat.h>
1411-#include <util/threadinterrupt.h>
1412-#include <util/time.h>
1413
1414 #include <chrono>
1415+#include <cstdint>
1416+#include <limits>
1417 #include <memory>
1418 #include <span>
1419 #include <string>
1420 #include <unordered_map>
1421
1422+class CThreadInterrupt;
1423+
1424 /**
1425 * Maximum time to wait for I/O readiness.
1426 * It will take up until this time to break off in case of an interruption.
1427diff --git a/src/util/strencodings.cpp b/src/util/strencodings.cpp
1428index ff59388..8a7a40d 100644
1429--- a/src/util/strencodings.cpp
1430+++ b/src/util/strencodings.cpp
1431@@ -9,12 +9,11 @@
1432 #include <span.h>
1433 #include <util/overflow.h>
1434
1435-#include <array>
1436 #include <cassert>
1437-#include <cstring>
1438+#include <compare>
1439 #include <limits>
1440 #include <optional>
1441-#include <ostream>
1442+#include <sstream>
1443 #include <string>
1444 #include <vector>
1445
1446diff --git a/src/util/strencodings.h b/src/util/strencodings.h
1447index faff83b..e527972 100644
1448--- a/src/util/strencodings.h
1449+++ b/src/util/strencodings.h
1450@@ -9,11 +9,9 @@
1451 #ifndef BITCOIN_UTIL_STRENCODINGS_H
1452 #define BITCOIN_UTIL_STRENCODINGS_H
1453
1454-#include <crypto/hex_base.h>
1455 #include <span.h>
1456 #include <util/string.h>
1457
1458-#include <algorithm>
1459 #include <array>
1460 #include <bit>
1461 #include <charconv>
1462@@ -21,6 +19,7 @@
1463 #include <cstdint>
1464 #include <limits>
1465 #include <optional>
1466+#include <span>
1467 #include <string>
1468 #include <string_view>
1469 #include <system_error>
1470diff --git a/src/util/string.cpp b/src/util/string.cpp
1471index c3b4b47..6e86095 100644
1472--- a/src/util/string.cpp
1473+++ b/src/util/string.cpp
1474@@ -4,7 +4,10 @@
1475
1476 #include <util/string.h>
1477
1478+#include <iterator>
1479+#include <memory>
1480 #include <regex>
1481+#include <stdexcept>
1482 #include <string>
1483
1484 namespace util {
1485diff --git a/src/util/string.h b/src/util/string.h
1486index 89e1309..20c7858 100644
1487--- a/src/util/string.h
1488+++ b/src/util/string.h
1489@@ -5,13 +5,14 @@
1490 #ifndef BITCOIN_UTIL_STRING_H
1491 #define BITCOIN_UTIL_STRING_H
1492
1493-#include <span.h>
1494-
1495+#include <algorithm>
1496+ echo '^^^ ⚠️ Failure generated from IWYU'
1497+ false
1498Command '['docker', 'exec', '--env', 'DANGER_RUN_CI_ON_HOST=1', 'ef0ae04418640ea860579a6a909948f6e9b8bf73fe95e1366c015818ef5ec691', '/home/runner/work/_temp/ci/test/03_test_script.sh']' returned non-zero exit status 1.
1499 #include <array>
1500+#include <cstddef>
1501 #include <cstdint>
1502-#include <cstring>
1503+#include <initializer_list>
1504 #include <locale>
1505 #include <optional>
1506+#include <span>
1507 #include <sstream>
1508 #include <string>
1509 #include <string_view>
1510diff --git a/src/util/thread.cpp b/src/util/thread.cpp
1511index 0fde73c..5b20e80 100644
1512--- a/src/util/thread.cpp
1513+++ b/src/util/thread.cpp
1514@@ -11,7 +11,6 @@
1515 #include <exception>
1516 #include <functional>
1517 #include <string>
1518-#include <utility>
1519
1520 void util::TraceThread(std::string_view thread_name, std::function<void()> thread_func)
1521 {
1522diff --git a/src/util/thread.h b/src/util/thread.h
1523index cb1dd86..d398b18 100644
1524--- a/src/util/thread.h
1525+++ b/src/util/thread.h
1526@@ -6,7 +6,7 @@
1527 #define BITCOIN_UTIL_THREAD_H
1528
1529 #include <functional>
1530-#include <string>
1531+#include <string_view>
1532
1533 namespace util {
1534 /**
1535diff --git a/src/util/threadnames.cpp b/src/util/threadnames.cpp
1536index 310f60f..c70650f 100644
1537--- a/src/util/threadnames.cpp
1538+++ b/src/util/threadnames.cpp
1539@@ -2,10 +2,9 @@
1540 // Distributed under the MIT software license, see the accompanying
1541 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
1542
1543+#include <algorithm>
1544 #include <cstring>
1545 #include <string>
1546-#include <thread>
1547-#include <utility>
1548
1549 #if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
1550 #include <pthread.h>
1551diff --git a/src/util/time.cpp b/src/util/time.cpp
1552index 9e0715e..170c0f3 100644
1553--- a/src/util/time.cpp
1554+++ b/src/util/time.cpp
1555@@ -5,7 +5,6 @@
1556
1557 #include <util/time.h>
1558
1559-#include <compat/compat.h>
1560 #include <tinyformat.h>
1561 #include <util/check.h>
1562 #include <util/strencodings.h>
1563@@ -13,6 +12,7 @@
1564 #include <array>
1565 #include <atomic>
1566 #include <chrono>
1567+#include <compare>
1568 #include <optional>
1569 #include <string>
1570 #include <string_view>
1571diff --git a/src/util/time.h b/src/util/time.h
1572index 30d363b..f46e5f0 100644
1573--- a/src/util/time.h
1574+++ b/src/util/time.h
1575@@ -6,9 +6,11 @@
1576 #ifndef BITCOIN_UTIL_TIME_H
1577 #define BITCOIN_UTIL_TIME_H
1578
1579+#include <sys/time.h>
1580 // The `util/time.h` header is designed to be a drop-in replacement for `chrono`.
1581 #include <chrono> // IWYU pragma: export
1582 #include <cstdint>
1583+#include <ctime>
1584 #include <optional>
1585 #include <string>
1586 #include <string_view>
1587diff --git a/src/util/tokenpipe.cpp b/src/util/tokenpipe.cpp
1588index c982fa6..92bcfb0 100644
1589--- a/src/util/tokenpipe.cpp
1590+++ b/src/util/tokenpipe.cpp
1591@@ -1,17 +1,20 @@
1592 // Copyright (c) 2021-present The Bitcoin Core developers
1593 // Distributed under the MIT software license, see the accompanying
1594 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
1595+#include <bitcoin-build-config.h> // IWYU pragma: keep
1596+
1597 #include <util/tokenpipe.h>
1598
1599-#include <bitcoin-build-config.h> // IWYU pragma: keep
1600+#include <sys/types.h>
1601
1602 #ifndef WIN32
1603
1604-#include <cerrno>
1605 #include <fcntl.h>
1606-#include <optional>
1607 #include <unistd.h>
1608
1609+#include <cerrno>
1610+#include <optional>
1611+
1612 TokenPipeEnd TokenPipe::TakeReadEnd()
1613 {
1614 TokenPipeEnd res(m_fds[0]);
1615^^^ ⚠️ Failure generated from IWYU