()
| 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() { |