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,
)
| 95 | /// } |
| 96 | /// ``` |
| 97 | pub 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 | /// |
no test coverage detected