From 2e53e05c23dbcf5fb7ff80de34e6347755eda152 Mon Sep 17 00:00:00 2001 From: Patrick Beza Date: Fri, 2 Aug 2024 15:08:29 +0200 Subject: [PATCH] fix(node): respect namespaces configuration --- core/bin/zksync_server/src/node_builder.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/bin/zksync_server/src/node_builder.rs b/core/bin/zksync_server/src/node_builder.rs index c0bf74946609..f504fa0eaebb 100644 --- a/core/bin/zksync_server/src/node_builder.rs +++ b/core/bin/zksync_server/src/node_builder.rs @@ -325,7 +325,14 @@ impl MainNodeBuilder { let state_keeper_config = try_load_config!(self.configs.state_keeper_config); let with_debug_namespace = state_keeper_config.save_call_traces; - let mut namespaces = Namespace::DEFAULT.to_vec(); + let mut namespaces = if let Some(namespaces) = &rpc_config.api_namespaces { + namespaces + .iter() + .map(|a| a.parse()) + .collect::>()? + } else { + Namespace::DEFAULT.to_vec() + }; if with_debug_namespace { namespaces.push(Namespace::Debug) }