apply_patches

Function apply_patches 

Source
pub fn apply_patches(
    new_storage: &mut [u64],
    old_storage: &[u64],
    patches: &[CopyFromPatch],
)
Expand description

Apply patches to a new flat array.

§Arguments

  • new_storage - Destination flat array with the new structure (initialized with zeros)
  • old_storage - Source flat array with the old structure
  • patches - List of patches generated by the diff function

§Panics

May panic if the addresses or sizes in the patches are invalid. (This should not happen if diff is correctly implemented)