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:283–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281
282 #[test]
283 fn test_compute_new_state_chain() {
284 let state0 = Merkle::ZERO;
285 let hash1 = test_hash();
286 let hash2 = test_hash2();
287
288 let state1 = compute_new_state(&state0, &hash1);
289 let state2 = compute_new_state(&state1, &hash2);
290
291 // Each state is unique
292 assert_ne!(state0, state1);
293 assert_ne!(state1, state2);
294 assert_ne!(state0, state2);
295 }
296
297 #[test]
298 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