From 7bae181c2c83a0410499ecf4e52df05ba79ebf8b Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 10 Jul 2023 23:43:44 +0000 Subject: [PATCH] Fix Budget::memory_bytes_cost --- soroban-sdk/src/testutils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soroban-sdk/src/testutils.rs b/soroban-sdk/src/testutils.rs index 89bd98482..a4c4a3c8b 100644 --- a/soroban-sdk/src/testutils.rs +++ b/soroban-sdk/src/testutils.rs @@ -117,7 +117,7 @@ pub mod budget { /// Note that memory is likely to be underestimated when running Rust /// code compared to running the WASM equivalent. pub fn memory_bytes_cost(&self) -> u64 { - self.0.get_cpu_insns_consumed().unwrap() + self.0.get_mem_bytes_consumed().unwrap() } /// Get the input tracker associated with the cost. The tracker tracks