Check if applying a change would succeed (without actually applying). This performs validation checks: - Change not already on view - All dependencies present # Arguments `txn` - The transaction to check against `view` - The view to check `change_id` - The internal ID of the change `change_hash` - The hash of the change `change` - The change to validate # Returns `Ok(())` if the change can be
(
txn: &T,
view: &ViewState,
change_id: NodeId,
change_hash: &Hash,
change: &Change,
)
| 266 | /// |
| 267 | /// `Ok(())` if the change can be applied, or an error describing why not. |
| 268 | pub fn validate_can_apply<T: ViewTxnT + GraphTxnT>( |
| 269 | txn: &T, |
| 270 | view: &ViewState, |
| 271 | change_id: NodeId, |
| 272 | change_hash: &Hash, |
| 273 | change: &Change, |
| 274 | ) -> Result<(), LocalApplyError> { |
| 275 | validate_can_apply_with_frontier(txn, view, change_id, change_hash, change).map(|_| ()) |
| 276 | } |
| 277 | |
| 278 | /// Validate application and return the verified causal knowledge for conflict checks. |
| 279 | pub fn validate_can_apply_with_frontier<T: ViewTxnT + GraphTxnT>( |
nothing calls this directly
no test coverage detected