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,
)
| 157 | /// } |
| 158 | /// ``` |
| 159 | pub 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 | /// |
no test coverage detected