From d69a582e72ea6eee67b5f659dd57c75e936a98dc Mon Sep 17 00:00:00 2001 From: TheCharlatan Date: Sun, 1 Jun 2025 18:31:40 +0200 Subject: [PATCH 1/2] kernel: Remove some unnecessary non-kernel includes Specifically gets rid of batchpriority, chainparams, script/sign.h and system includes. Also take the opportunity of cleaning up the headers for the effected files and adding them to the iwyu-enforced set. --- ci/test/03_test_script.sh | 2 +- src/core_read.cpp | 16 +++++++++++++--- src/node/blockstorage.cpp | 15 +++++++++++---- src/node/blockstorage.h | 5 +++++ src/node/utxo_snapshot.cpp | 2 +- src/node/utxo_snapshot.h | 10 +++++++--- src/signet.cpp | 13 +++++++------ src/signet.h | 6 +++++- 8 files changed, 50 insertions(+), 19 deletions(-) diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index 39e13945e25..7f8fad71408 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -209,7 +209,7 @@ if [ "${RUN_TIDY}" = "true" ]; then fi # TODO: Consider enforcing IWYU across the entire codebase. - FILES_WITH_ENFORCED_IWYU="/src/(crypto|index)/.*\\.cpp" + FILES_WITH_ENFORCED_IWYU="/src/((crypto|index)/.*\\.cpp|node/blockstorage.cpp|node/utxo_snapshot.cpp|core_read.cpp|signet.cpp)" jq --arg patterns "$FILES_WITH_ENFORCED_IWYU" 'map(select(.file | test($patterns)))' "${BASE_BUILD_DIR}/compile_commands.json" > "${BASE_BUILD_DIR}/compile_commands_iwyu_errors.json" jq --arg patterns "$FILES_WITH_ENFORCED_IWYU" 'map(select(.file | test($patterns) | not))' "${BASE_BUILD_DIR}/compile_commands.json" > "${BASE_BUILD_DIR}/compile_commands_iwyu_warnings.json" diff --git a/src/core_read.cpp b/src/core_read.cpp index 59e011e0661..935f465983d 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -4,17 +4,27 @@ #include -#include +#include // IWYU pragma: keep #include +#include