MCPcopy Create free account
hub / github.com/base/base / test_encode_proof_bytes_errors

Function test_encode_proof_bytes_errors

crates/proof/primitives/src/proof_encoder.rs:183–187  ·  view source on GitHub ↗
(#[case] sig: Vec<u8>, #[case] expected_err: &str)

Source from the content-addressed store, hash-verified

181 #[case::short_signature(vec![0u8; 32], "invalid signature length")]
182 #[case::oversized_signature(vec![0u8; 70], "invalid signature length")]
183 fn test_encode_proof_bytes_errors(#[case] sig: Vec<u8>, #[case] expected_err: &str) {
184 let result = ProofEncoder::encode_proof_bytes(&Bytes::from(sig), B256::ZERO, 0);
185 assert!(result.is_err());
186 assert!(result.unwrap_err().to_string().contains(expected_err));
187 }
188
189 // --- encode_dispute_proof_bytes tests ---
190

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected