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

Function is_change_on_view

atomic-core/src/apply/change.rs:159–165  ·  view source on GitHub ↗

Check if a change has already been applied to a view. # Arguments `txn` - The transaction to check against `view` - The view to check `change_id` - The internal ID of the change # Returns `true` if the change is already on the view. # Example ```rust,ignore let change_id = txn.get_internal(&change_hash)?.unwrap(); if is_change_on_view(&txn, &view, change_id)? { println!("Change already appli

(
    txn: &T,
    view: &ViewState,
    change_id: NodeId,
)

Source from the content-addressed store, hash-verified

157/// }
158/// ```
159pub fn is_change_on_view<T: ViewTxnT>(
160 txn: &T,
161 view: &ViewState,
162 change_id: NodeId,
163) -> Result<bool, PristineError> {
164 Ok(txn.get_change_seq(view, change_id)?.is_some())
165}
166
167/// Compute the new Merkle state after applying a change.
168///

Callers 1

Calls 1

get_change_seqMethod · 0.45

Tested by

no test coverage detected