test kernel: Don't log on warnings change
What changed, and why it matters
This commit removes two logging-only functions from a Bitcoin Core test file. The functions only printed messages to the console when kernel warnings were set or unset during tests. Their removal does not change any production code, network behavior, or security logic. It is a minor cleanup of test output.
No security action needed. Treat as ordinary test-code cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes WarningSetHandler and WarningUnsetHandler overrides from src/test/kernel/test_kernel.cpp. These overrides were part of a test fixture implementing the kernel notifications interface and merely logged warning state changes to stdout. The commit message states the overrides ‘didn’t test anything meaningful.’ No functional test assertions, kernel logic, or runtime warning handling are modified.
Changed components
src/test/kernel/test_kernel.cppInspect captured patch +0 / −10
diff --git a/src/test/kernel/test_kernel.cpp b/src/test/kernel/test_kernel.cpp
index a49dcb87..689732e1 100644
--- a/src/test/kernel/test_kernel.cpp
+++ b/src/test/kernel/test_kernel.cpp
@@ -120,16 +120,6 @@ public:
BOOST_CHECK_GT(timestamp, 0);
}
- void WarningSetHandler(Warning warning, std::string_view message) override
- {
- std::cout << "Kernel warning is set: " << message << std::endl;
- }
-
- void WarningUnsetHandler(Warning warning) override
- {
- std::cout << "Kernel warning was unset." << std::endl;
- }
-
void FlushErrorHandler(std::string_view error) override
{
std::cout << error << std::endl;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.