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

Function insert_applied_hashes

atomic-cli/src/commands/rpc.rs:3951–3963  ·  view source on GitHub ↗

The applied hashes off the response's inserted entries.

(response: &pb::InsertChangesResponse)

Source from the content-addressed store, hash-verified

3949
3950/// The applied hashes off the response's inserted entries.
3951fn insert_applied_hashes(response: &pb::InsertChangesResponse) -> Vec<Merkle> {
3952 response
3953 .inserted
3954 .iter()
3955 .filter_map(|change| {
3956 change
3957 .hash
3958 .as_ref()
3959 .and_then(|h| h.value.clone().try_into().ok())
3960 .map(Merkle)
3961 })
3962 .collect()
3963}
3964
3965/// The response's cross-view outcome — the shape the local body's
3966/// `print_cross_view_outcome` renders (the skipped placeholder hashes

Callers 2

insert_singleFunction · 0.85

Calls 5

as_refMethod · 0.80
collectMethod · 0.45
iterMethod · 0.45
okMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected