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

Function is_change_on_view

atomic-core/src/apply/change.rs:97–103  ·  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

95/// }
96/// ```
97pub fn is_change_on_view<T: ViewTxnT>(
98 txn: &T,
99 view: &ViewState,
100 change_id: NodeId,
101) -> Result<bool, PristineError> {
102 Ok(txn.get_change_seq(view, change_id)?.is_some())
103}
104
105/// Compute the new Merkle state after applying a change.
106///

Callers 1

validate_can_applyFunction · 0.85

Calls 1

get_change_seqMethod · 0.45

Tested by

no test coverage detected