Add expected cfgs to `lightning-tests` lints
What changed, and why it matters
This commit adds a Rust compiler lint configuration to the lightning-tests package. It tells the compiler to treat 'taproot' as an expected configuration flag and to forbid unexpected ones. This is a code-quality/build-hardening change, not a security fix for a vulnerability.
No security action required. Treat as routine build/lint hygiene.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds a [lints.rust.unexpected_cfgs] section to lightning-tests/Cargo.toml, setting level = ‘forbid’ and declaring cfg(taproot) as expected. This prevents typos or accidental use of unrecognized cfg attributes during compilation. There is no functional code change, no patch of a vulnerability, and no disclosed security issue.
Changed components
lightning-tests/Cargo.tomlInspect captured patch +10 / −0
diff --git a/lightning-tests/Cargo.toml b/lightning-tests/Cargo.toml
index 23c81fa..1bae68b 100644
--- a/lightning-tests/Cargo.toml
+++ b/lightning-tests/Cargo.toml
@@ -20,3 +20,13 @@ lightning_0_0_125 = { package = "lightning", version = "0.0.125", features = ["_
bitcoin = { version = "0.32.2", default-features = false }
[dev-dependencies]
+
+[lints.rust.unexpected_cfgs]
+level = "forbid"
+# When adding a new cfg attribute, ensure that it is added to this list.
+#
+# Note that Cargo automatically declares corresponding cfgs for every feature
+# defined in the member-level [features] tables as "expected".
+check-cfg = [
+ "cfg(taproot)",
+]
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.