test: Prevent disk space warning during node_init_tests
What changed, and why it matters
This is a minor test-only change. A Bitcoin Core unit test was accidentally configured to use the main network (mainnet) parameters, which caused a harmless but noisy warning about needing hundreds of gigabytes of disk space. The fix makes the test use the small regtest network parameters instead. It does not change production code or affect real users, wallets, or funds.
No security action required. This is a test-hygiene fix. Reviewers may optionally verify that other test fixtures in the same file or related tests do not similarly default to mainnet when regtest is intended.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies src/test/node_init_tests.cpp to introduce an InitTestSetup fixture that derives from BasicTestingSetup but explicitly passes ChainType::REGTEST to the base constructor. The test suite is then switched from BasicTestingSetup to InitTestSetup. This suppresses a disk-space warning that appeared because mainnet block parameters were being used during test initialization. No consensus, networking, wallet, or node runtime code is changed.
Changed components
src/test/node_init_tests.cppInspect captured patch +6 / −1
diff --git a/src/test/node_init_tests.cpp b/src/test/node_init_tests.cpp
index 802e3176..90eab38f 100644
--- a/src/test/node_init_tests.cpp
+++ b/src/test/node_init_tests.cpp
@@ -11,7 +11,12 @@
using node::NodeContext;
-BOOST_FIXTURE_TEST_SUITE(node_init_tests, BasicTestingSetup)
+//! Like BasicTestingSetup, but using regtest network instead of mainnet.
+struct InitTestSetup : BasicTestingSetup {
+ InitTestSetup() : BasicTestingSetup{ChainType::REGTEST} {}
+};
+
+BOOST_FIXTURE_TEST_SUITE(node_init_tests, InitTestSetup)
//! Custom implementation of interfaces::Init for testing.
class TestInit : public interfaces::Init
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.