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

Function test_encode_proof_bytes_v_value

crates/proof/primitives/src/proof_encoder.rs:173–177  ·  view source on GitHub ↗
(#[case] input_v: u8, #[case] expected_v: u8)

Source from the content-addressed store, hash-verified

171 #[case::v_27_unchanged(27, 27)]
172 #[case::v_28_unchanged(28, 28)]
173 fn test_encode_proof_bytes_v_value(#[case] input_v: u8, #[case] expected_v: u8) {
174 let sig = test_signature(input_v);
175 let proof = ProofEncoder::encode_proof_bytes(&sig, B256::ZERO, 0).unwrap();
176 assert_eq!(proof[129], expected_v);
177 }
178
179 #[rstest]
180 #[case::invalid_v(vec![0xAB; 64].into_iter().chain(core::iter::once(5)).collect::<Vec<_>>(), "invalid ECDSA v-value")]

Callers

nothing calls this directly

Calls 1

test_signatureFunction · 0.85

Tested by

no test coverage detected