From 82346ea4b20ba71c6841af17c52346602624be36 Mon Sep 17 00:00:00 2001 From: Zhang Junyu Date: Fri, 16 Aug 2024 04:33:07 +0000 Subject: [PATCH] fix writing external host call table --- crates/specs/src/lib.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/crates/specs/src/lib.rs b/crates/specs/src/lib.rs index 2b4e8d3a4..af7607801 100644 --- a/crates/specs/src/lib.rs +++ b/crates/specs/src/lib.rs @@ -108,10 +108,18 @@ impl Tables { ); } }); - write_file( - dir, - "external_host_table.json", - &serde_json::to_string_pretty(&self.execution_tables.external_host_call_table).unwrap(), - ); + + for (i, external_host_call_table) in self + .execution_tables + .external_host_call_table + .iter() + .enumerate() + { + write_file( + dir, + &format!("external_host_table.{}.json", i), + &serde_json::to_string_pretty(&external_host_call_table).unwrap(), + ); + } } }