pub fn load_wasm(&self, checksum: &Checksum) -> VmResult<Vec<u8>> {
        let code = load_wasm_from_disk(&self.wasm_path, checksum)?;
        // verify hash matches (integrity check)
        if Checksum::generate(&code) != *checksum {
            Err(VmError::integrity_err())
        } else {
            Ok(code)
        }
    }
/// Retrieves a Wasm blob that was previously stored via save_wasm.
/// When the cache is instantiated with the same base dir, this finds Wasm files on disc across multiple cache instances (i.e. node restarts).
/// This function is public to allow a checksum to Wasm lookup in the blockchain.
///
/// If the given ID is not found or the content does not match the hash (=ID), an error is returned.
Retrieves a Wasm blob that was previously stored via save_wasm.
When the cache is instantiated with the same base dir, this finds Wasm files on disc across multiple cache instances .
This function is public to allow a checksum to Wasm lookup in the blockchain.

If the given ID is not found or the content does not match the hash (=ID), an error is returned.
Retrieves a Wasm blob that was previously stored via save_wasm . When the cache is instantiated with the same base dir this finds Wasm files on disc across multiple cache instances . This function is public to allow a checksum to Wasm lookup in the blockchain . If the given ID is not found or the content does not match the hash ( = ID ) an error is returned .
pub fn load_wasm(&self, checksum: &Checksum) -> VmResult<Vec<u8>> {
        let code = load_wasm_from_disk(&self.wasm_path, checksum)?;
        // verify hash matches (integrity check)
        if Checksum::generate(&code) != *checksum {
            Err(VmError::integrity_err())
        } else {
            Ok(code)
        }
    }
pub fn load_wasm ( & self , checksum : & Checksum ) -> VmResult < Vec < u8 > > { let code = load_wasm_from_disk ( & self . wasm_path , checksum ) ? ; // verify hash matches (integrity check) if Checksum :: generate ( & code ) != * checksum { Err ( VmError :: integrity_err ( ) ) } else { Ok ( code ) } }
Retrieves a Wasm blob that was previously stored via save_wasm.
Retrieves a Wasm blob that was previously stored via save_wasm .
&self
checksum
&Checksum
&self
checksum
&Checksum