pub fn verify_update<T: MetadataValue>(
    metadata_spec: &SideMetadataSpec,
    data_addr: Address,
    old_val: T,
    new_val: T
)
Expand description

Commits an update operation and ensures it returns the correct old side metadata content. Panics if: 1 - the metadata spec is not valid, 2 - the old side metadata content is not equal to the correct old content.

Arguments:

  • metadata_spec: the metadata spec to verify the old content for
  • data_addr: the address of the source data
  • old_val: the expected old value
  • new_val: the new value the metadata should hold.