crypto: Remove unused test from ecdsa
What changed, and why it matters
This commit simply deletes a test that is no longer useful because the feature it was testing had already been removed. There is no code change that affects users, no bug fix, and no security issue.
No action needed. This is a non-functional test cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes the write_serialized_signature unit test from crypto/src/ecdsa.rs. The test exercised serialize_to_writer/std::io::Write integration on ecdsa::Signature, which was removed as part of the bitcoin-io dependency removal. The diff is purely test-code deletion (-18 lines, +0 lines) and does not alter any library behavior, API, or cryptographic logic.
Changed components
crypto/src/ecdsa.rs (tests module only)Inspect captured patch +0 / −18
diff --git a/crypto/src/ecdsa.rs b/crypto/src/ecdsa.rs
index 9f8f99df..2c9949d7 100644
--- a/crypto/src/ecdsa.rs
+++ b/crypto/src/ecdsa.rs
@@ -351,28 +351,10 @@ impl<'a> Arbitrary<'a> for Signature {
#[cfg(test)]
mod tests {
- use alloc::vec;
- #[cfg(feature = "std")]
- use std::io::Write;
-
use super::*;
const TEST_SIGNATURE_HEX: &str = "3046022100839c1fbc5304de944f697c9f4b1d01d1faeba32d751c0f7acb21ac8a0f436a72022100e89bd46bb3a5a62adc679f659b7ce876d83ee297c7a5587b2011c4fcc72eab45";
- #[test]
- #[cfg(feature = "std")]
- fn write_serialized_signature() {
- let sig = Signature {
- signature: secp256k1::ecdsa::Signature::from_str(TEST_SIGNATURE_HEX).unwrap(),
- sighash_type: EcdsaSighashType::All,
- };
-
- let mut buf = vec![];
- buf.write_all(&sig.serialize()).expect("write failed");
-
- assert_eq!(sig.to_vec(), buf);
- }
-
#[test]
fn iterate_serialized_signature() {
let sig = Signature {
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.