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

Function insert_applied_hashes

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

The applied hashes off the response's inserted entries.

(response: &pb::InsertChangesResponse)

Source from the content-addressed store, hash-verified

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