From 824b533777703f38f2ab8e89e5ff724123cc8602 Mon Sep 17 00:00:00 2001 From: Vadim Smirnov Date: Wed, 16 Aug 2023 13:13:38 +0400 Subject: [PATCH] version 2 --- runtime-interface/src/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/runtime-interface/src/lib.rs b/runtime-interface/src/lib.rs index eabdf05f32a..e4534c32f3d 100644 --- a/runtime-interface/src/lib.rs +++ b/runtime-interface/src/lib.rs @@ -24,6 +24,7 @@ use codec::{Decode, Encode}; use gear_backend_common::{ lazy_pages::{GlobalsAccessConfig, Status}, + memory::ProcessAccessError, LimitedStr, }; use gear_core::{ @@ -95,6 +96,17 @@ pub fn deserialize_mem_intervals(bytes: &[u8], intervals: &mut Vec (GasLeft, Result<(), ProcessAccessError>) { + let mut gas_left = gas_left.0; + let res = lazy_pages::pre_process_memory_accesses(reads, writes, &mut gas_left); + (gas_left, res) + } + + #[version(2)] fn pre_process_memory_accesses(reads: &[u8], writes: &[u8], gas_couunter: u64) -> (u64, u8) { let reads_len = reads.len(); let writes_len = writes.len();