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

Function invalid_encoding_version

crates/batcher/blobs/src/decoder.rs:177–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175
176 #[test]
177 fn invalid_encoding_version() {
178 let mut blob = Box::new(Blob::ZERO);
179 let data: &mut [u8; BYTES_PER_BLOB] = blob.as_mut();
180 // Set version to 1 instead of 0.
181 data[VERSIONED_HASH_VERSION_KZG as usize] = 1;
182 let err = BlobDecoder::decode(&blob).unwrap_err();
183 assert_eq!(err, BlobDecodeError::InvalidEncodingVersion { version: 1 });
184 }
185
186 #[test]
187 fn invalid_length() {

Callers

nothing calls this directly

Calls 3

as_mutMethod · 0.80
newFunction · 0.50
decodeFunction · 0.50

Tested by

no test coverage detected