File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,23 @@ struct BasicTestingSetup {
75
75
fs::path m_path_root;
76
76
fs::path m_path_lock;
77
77
bool m_has_custom_datadir{false };
78
+ /* * @brief Test-specific arguments and settings.
79
+ *
80
+ * This member is intended to be the primary source of settings for code
81
+ * being tested by unit tests. It exists to make tests more self-contained
82
+ * and reduce reliance on global state.
83
+ *
84
+ * Usage guidelines:
85
+ * 1. Prefer using m_args where possible in test code.
86
+ * 2. If m_args is not accessible, use m_node.args as a fallback.
87
+ * 3. Avoid direct references to gArgs in test code.
88
+ *
89
+ * Note: Currently, m_node.args points to gArgs for backwards
90
+ * compatibility. In the future, it will point to m_args to further isolate
91
+ * test environments.
92
+ *
93
+ * @see https://github.com/bitcoin/bitcoin/issues/25055 for additional context.
94
+ */
78
95
ArgsManager m_args;
79
96
};
80
97
You can’t perform that action at this time.
0 commit comments