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

Function test_decode_block_count_errors

crates/consensus/protocol/src/batch/payload.rs:176–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174
175 #[test]
176 fn test_decode_block_count_errors() {
177 let block_count = SpanBatchElement::MAX_SPAN_BATCH_ELEMENTS + 1;
178 let mut u64_varint_buf = [0; 10];
179 let mut encoded = unsigned_varint::encode::u64(block_count, &mut u64_varint_buf);
180 let mut payload = SpanBatchPayload::default();
181 let err = payload.decode_block_count(&mut encoded).unwrap_err();
182 assert_eq!(err, SpanBatchError::TooBigSpanBatchSize);
183 }
184
185 #[test]
186 fn test_decode_block_tx_counts() {

Callers

nothing calls this directly

Calls 1

decode_block_countMethod · 0.80

Tested by

no test coverage detected