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

Function test_decode_encode_raw_span_batch

crates/consensus/protocol/src/batch/raw.rs:102–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100
101 #[test]
102 fn test_decode_encode_raw_span_batch() {
103 // Load in the raw span batch from the reference derivation pipeline implementation.
104 let raw_span_batch_hex = include_bytes!("./testdata/raw_batch.hex");
105 let raw_span_batch = RawSpanBatch::decode(&mut raw_span_batch_hex.as_slice()).unwrap();
106
107 let mut encoding_buf = Vec::new();
108 raw_span_batch.encode(&mut encoding_buf).unwrap();
109 assert_eq!(encoding_buf, raw_span_batch_hex);
110 }
111}

Callers

nothing calls this directly

Calls 3

decodeFunction · 0.50
newFunction · 0.50
encodeMethod · 0.45

Tested by

no test coverage detected