pub(crate) fn create_module_resolver(
    protocol_version: ProtocolVersion,
    wasm_config: &WasmConfig,
) -> Result<impl ModuleImportResolver + MemoryResolver, ResolverError> {
    // TODO: revisit how protocol_version check here is meant to combine with upgrade
    if protocol_version >= ProtocolVersion::V1_0_0 {
        return Ok(v1_resolver::RuntimeModuleImportResolver::new(
            wasm_config.max_memory,
        ));
    }
    Err(ResolverError::UnknownProtocolVersion(protocol_version))
}
/// Creates a module resolver for given protocol version.
///
/// * `protocol_version` Version of the protocol. Can't be lower than 1.
Creates a module resolver for given protocol version.
`protocol_version` Version of the protocol. Can't be lower than 1.
Creates a module resolver for given protocol version . ` protocol_version ` Version of the protocol . Can ' t be lower than 1 .
pub(crate) fn create_module_resolver(
    protocol_version: ProtocolVersion,
    wasm_config: &WasmConfig,
) -> Result<impl ModuleImportResolver + MemoryResolver, ResolverError> {
    // TODO: revisit how protocol_version check here is meant to combine with upgrade
    if protocol_version >= ProtocolVersion::V1_0_0 {
        return Ok(v1_resolver::RuntimeModuleImportResolver::new(
            wasm_config.max_memory,
        ));
    }
    Err(ResolverError::UnknownProtocolVersion(protocol_version))
}
pub ( crate ) fn create_module_resolver ( protocol_version : ProtocolVersion , wasm_config : & WasmConfig , ) -> Result < impl ModuleImportResolver + MemoryResolver , ResolverError > { // TODO: revisit how protocol_version check here is meant to combine with upgrade if protocol_version >= ProtocolVersion :: V1_0_0 { return Ok ( v1_resolver :: RuntimeModuleImportResolver :: new ( wasm_config . max_memory , ) ) ; } Err ( ResolverError :: UnknownProtocolVersion ( protocol_version ) ) }
Creates a module resolver for given protocol version.
Creates a module resolver for given protocol version .
protocol_version
ProtocolVersion
wasm_config
&WasmConfig
protocol_version
ProtocolVersion
wasm_config
&WasmConfig