MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_compute_new_state_chain

Function test_compute_new_state_chain

atomic-core/src/apply/change.rs:359–371  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357
358 #[test]
359 fn test_compute_new_state_chain() {
360 let state0 = Merkle::ZERO;
361 let hash1 = test_hash();
362 let hash2 = test_hash2();
363
364 let state1 = compute_new_state(&state0, &hash1);
365 let state2 = compute_new_state(&state1, &hash2);
366
367 // Each state is unique
368 assert_ne!(state0, state1);
369 assert_ne!(state1, state2);
370 assert_ne!(state0, state2);
371 }
372
373 #[test]
374 fn test_compute_new_state_order_matters() {

Callers

nothing calls this directly

Calls 3

test_hash2Function · 0.85
compute_new_stateFunction · 0.85
test_hashFunction · 0.70

Tested by

no test coverage detected