diff --git a/cmd/soroban-rpc/lib/preflight/src/lib.rs b/cmd/soroban-rpc/lib/preflight/src/lib.rs index b762db60..70bb909c 100644 --- a/cmd/soroban-rpc/lib/preflight/src/lib.rs +++ b/cmd/soroban-rpc/lib/preflight/src/lib.rs @@ -38,6 +38,8 @@ mod curr { pub(crate) use soroban_simulation_curr as soroban_simulation; #[allow(clippy::duplicate_mod)] pub(crate) mod shared; + + pub(crate) const PROTOCOL: u32 = soroban_env_host::meta::INTERFACE_VERSION.protocol; } #[path = "."] @@ -46,6 +48,9 @@ mod prev { pub(crate) use soroban_simulation_prev as soroban_simulation; #[allow(clippy::duplicate_mod)] pub(crate) mod shared; + + pub(crate) const PROTOCOL: u32 = soroban_env_host::meta::get_ledger_protocol_version( + soroban_env_host::meta::INTERFACE_VERSION); } use std::cell::RefCell; diff --git a/cmd/soroban-rpc/lib/preflight/src/shared.rs b/cmd/soroban-rpc/lib/preflight/src/shared.rs index a517eadd..6ec6b7a6 100644 --- a/cmd/soroban-rpc/lib/preflight/src/shared.rs +++ b/cmd/soroban-rpc/lib/preflight/src/shared.rs @@ -41,8 +41,6 @@ use std::convert::TryFrom; use std::ptr::null_mut; use std::rc::Rc; -pub(crate) const PROTOCOL: u32 = meta::get_ledger_protocol_version(meta::INTERFACE_VERSION); - fn fill_ledger_info(c_ledger_info: CLedgerInfo, network_config: &NetworkConfig) -> LedgerInfo { let network_passphrase = unsafe { from_c_string(c_ledger_info.network_passphrase) }; let mut ledger_info = LedgerInfo {