Check the requested identity even when a store returned a valid witness for some other change.
(&self, expected: &Hash)
| 53 | /// Check the requested identity even when a store returned a valid witness |
| 54 | /// for some other change. |
| 55 | pub fn check_hash(&self, expected: &Hash) -> Result<(), ChangeError> { |
| 56 | if self.hash != *expected { |
| 57 | return Err(ChangeError::Invalid(format!( |
| 58 | "change hash mismatch: expected {expected:?}, computed {:?}", |
| 59 | self.hash |
| 60 | ))); |
| 61 | } |
| 62 | Ok(()) |
| 63 | } |
| 64 | |
| 65 | /// Whether these bytes exactly match the previously verified source, |
| 66 | /// including unhashed notes/signatures. A change in any byte requires a |
no outgoing calls