MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / commit_roundtrip

Function commit_roundtrip

crates/commitlog/src/commit.rs:415–429  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

413
414 #[test]
415 fn commit_roundtrip() {
416 let records = vec![0; 128];
417 let commit = Commit {
418 min_tx_offset: 0,
419 n: 3,
420 records,
421 epoch: Commit::DEFAULT_EPOCH,
422 };
423
424 let mut buf = Vec::with_capacity(commit.encoded_len());
425 commit.write(&mut buf).unwrap();
426 let commit2 = Commit::decode(&mut buf.as_slice()).unwrap().unwrap();
427
428 assert_eq!(commit, commit2);
429 }
430
431 #[test]
432 fn into_transactions_can_skip_txs() {

Callers

nothing calls this directly

Calls 4

decodeFunction · 0.85
encoded_lenMethod · 0.80
unwrapMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…