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

Function test_single_batch_encode_decode

crates/consensus/protocol/src/batch/core.rs:92–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90
91 #[test]
92 fn test_single_batch_encode_decode() {
93 let mut out = Vec::new();
94 let batch = Batch::Single(SingleBatch::default());
95 batch.encode(&mut out).unwrap();
96 let decoded = Batch::decode(&mut out.as_slice(), &RollupConfig::default()).unwrap();
97 assert_eq!(batch, decoded);
98 }
99
100 #[test]
101 fn test_span_batch_encode_decode() {

Callers

nothing calls this directly

Calls 3

newFunction · 0.50
decodeFunction · 0.50
encodeMethod · 0.45

Tested by

no test coverage detected